Tue Aug 30 07:11:09 CDT 2011
Thanks for the hint. I get this error:
NameError: name '_get_ipy_startup' is not defined
If I comment out that line, and the later reference to the ipython
startup file, it now does load my ~/.pythonrc.
Also, if I'm loading the iPython config file explicitely from the
iPython config file (where I am now loading the .pythonrc file too)
So, if I use your code snippet without the "ipy_startup_file", am I
now not loading things I should be loading in iPython?
On Tue, 30 Aug 2011, Aroldo Souza-Leite wrote:
> Hi Ken,
> try this in your '~/.ipythonrc.d/profile_default/ipython_config.py':
> ------- <snip>
> import os
> HOME = os.environ['HOME']
> pystartup_path = os.path.join(HOME,'.pystartup') # the non-IPython Python
> startup file
> ipy_startup_path= _get_ipy_startup(profile='default') # implemented here
> returns a startup file path for my IPython
> omit this if you only want the non-IPython startup
> c = get_config() # this factory is automatically available in the
> 'ipython_config.py' module namespace
> c.InteractiveShellApp.exec_files = [
> ipy_startup_path, # omit this if you only want the non-IPython startup
> # put further startup files here
> ------ <snap>
> I hope this helps you.
> On 30.08.2011 00:22, Ken Mankoff wrote:
>> I'd like to make my iPython and python shells operate in as similar
>> a fashion as possible. How do I get iPython to run my ~/.pythonrc
>> file, or where would I put a simlar file, if I must maintain two,
>> for iPython to run?
>> I'm running 0.11, and have a
>> ~/.ipython/profile_default/ipython_config.py but if I add commands
>> to that it causes a crash when I next run ipython.
>> IPython-User mailing list
More information about the IPython-User