[IPython-User] config in a python2/python3 environment
MinRK
benjaminrk@gmail....
Fri Nov 18 15:31:19 CST 2011
2011/11/18 Jörgen Stenarson <jorgen.stenarson@bostream.nu>
> Hi,
>
> how do you handle the ipython configuration in a way that works for both
> python2 and python3?
>
> I did the following in my ipython_config.py to separate the exec_files
>
> import sys
> if sys.version_info[0] < 3:
> #python2 versions
> c.TerminalIPythonApp.exec_files = ['extras.py', 'ipython-imports.py']
> else:
> #python3 versions
> c.TerminalIPythonApp.exec_files = []
>
That's one way to do it, or you can use a different profile for Python 3 if
the difference is significant, and just `alias ip3='ipython3
--profile=py3'`.
>
>
> /Jörgen
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20111118/d7aef6f4/attachment.html
More information about the IPython-User
mailing list