[IPython-User] .pythonrc

Aroldo Souza-Leite asouzaleite@gmx...
Tue Aug 30 01:45:57 CDT 2011


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 file
     pystartup_path,
     # put further startup files here
     ]

------ <snap>

I hope this helps you.

Regards,

Aroldo



On 30.08.2011 00:22, Ken Mankoff wrote:
> Hi,
>
> 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.
>
> Thanks,
>
>     -k.
>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user



More information about the IPython-User mailing list