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

Function locate_profile

IPython/paths.py:108–119  ·  view source on GitHub ↗

Find the path to the folder associated with a given profile. I.e. find $IPYTHONDIR/profile_whatever.

(profile='default')

Source from the content-addressed store, hash-verified

106 return py3compat.cast_unicode(the_path, fs_encoding)
107
108def locate_profile(profile='default'):
109 """Find the path to the folder associated with a given profile.
110
111 I.e. find $IPYTHONDIR/profile_whatever.
112 """
113 from IPython.core.profiledir import ProfileDir, ProfileDirError
114 try:
115 pd = ProfileDir.find_profile_dir_by_name(get_ipython_dir(), profile)
116 except ProfileDirError:
117 # IOError makes more sense when people are expecting a path
118 raise IOError("Couldn't find profile %r" % profile)
119 return pd.location

Callers 2

locate_profileFunction · 0.90
_get_hist_file_nameMethod · 0.90

Calls 2

get_ipython_dirFunction · 0.70

Tested by

no test coverage detected