MCPcopy Index your code
hub / github.com/ipython/ipython / locate_profile

Function locate_profile

IPython/paths.py:111–122  ·  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

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

Callers 1

_get_hist_file_nameMethod · 0.90

Calls 2

get_ipython_dirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…