Updated Bash IPython Alias That Works for 0.10 and 0.11.

In July 2011, IPython released version 0.11, which changes/ breaks the embedded shell api.

https://github.com/ipython/ipython/issues/269

http://ipython.org/ipython-doc/stable/interactive/reference.html#embedding

I use this bash alias to get it work right under both versions (0.11 first, then 0.10):

alias ipython='python -c "from IPython import embed; embed()" 2>/dev/null || python -c "import IPython; IPython.Shell.IPShell().mainloop()"'

About these ads

One Comment on “Updated Bash IPython Alias That Works for 0.10 and 0.11.”

  1. […] Updated Bash IPython Alias That Works for 0.10 and 0.11. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.