MCPcopy Create free account
hub / github.com/ipython/ipython / find_profile_dir

Method find_profile_dir

IPython/core/profiledir.py:210–223  ·  view source on GitHub ↗

Find/create a profile dir and return its ProfileDir. This will create the profile directory if it doesn't exist. Parameters ---------- profile_dir : unicode or str The path of the profile directory.

(cls, profile_dir, config=None)

Source from the content-addressed store, hash-verified

208
209 @classmethod
210 def find_profile_dir(cls, profile_dir, config=None):
211 """Find/create a profile dir and return its ProfileDir.
212
213 This will create the profile directory if it doesn't exist.
214
215 Parameters
216 ----------
217 profile_dir : unicode or str
218 The path of the profile directory.
219 """
220 profile_dir = expand_path(profile_dir)
221 if not os.path.isdir(profile_dir):
222 raise ProfileDirError('Profile directory not found: %s' % profile_dir)
223 return cls(location=profile_dir, config=config)

Callers 1

init_profile_dirMethod · 0.80

Calls 2

expand_pathFunction · 0.85
ProfileDirErrorClass · 0.85

Tested by

no test coverage detected