def locate_profile(profile='<STR_LIT:default>'):
from IPython.core.profiledir import ProfileDir, ProfileDirError<EOL>try:<EOL><INDENT>pd = ProfileDir.find_profile_dir_by_name(get_ipython_dir(), profile)<EOL><DEDENT>except ProfileDirError:<EOL><INDENT>raise IOError("<STR_LIT>" % profile)<EOL><DEDENT>return pd.location<EOL>
Find the path to the folder associated with a given profile.

    I.e. find $IPYTHONDIR/profile_whatever.