[IPython-dev] Do we have an get_ipython_dir
Wed Sep 3 16:13:11 CDT 2008
The reason that I ask is that we have get_home_dir repeated twice:
I want to get rid of one of these. IPython/config/cutils.py also has
an get_ipython_dir.py, but I don't think this is the right place for
Also pulling the value from IP won't work in my case because I need it
for the controller and engines, which (for now) don't have a full IP
Is this the right logic from ipmaker.py:
# Platform-dependent suffix and directory names. We use _ipython instead
# of .ipython under win32 b/c there's software that breaks with .named
# directories on that platform.
if os.name == 'posix':
rc_suffix = ''
ipdir_def = '.ipython'
rc_suffix = '.ini'
ipdir_def = '_ipython'
# default directory for configuration
ipythondir_def = os.path.abspath(os.environ.get('IPYTHONDIR',
If so, I will make a get_ipython_dir function in genutils and remove
the cruft from config/cutils.py
On Wed, Sep 3, 2008 at 2:08 PM, Fernando Perez <firstname.lastname@example.org> wrote:
> On Wed, Sep 3, 2008 at 1:59 PM, Brian Granger <email@example.com> wrote:
>> Do we have a get_ipython_dir function somehere. I see a get_home_dir
>> in genutils, but not one for finding the .ipython dir on all
>> Also, if this function doesn' exist, where is the equivalent logic?
> The logic is unfortunately not encapsulated in a function, it's inline
> in the old, messy ipmaker.py. The *value* however, is available as
> IP.ipythondir, where IP is the main ipython object.
> This should obviously be refactored later...
More information about the IPython-dev