Skip to main content

PyCon: IPython: Getting the Most out of Working Interactively in Python

IPython is an amazing replacement for the standard Python shell. As a result of this talk, I've already switched.
  • It's embeddable so that you can add a shell into your existing applications.
  • You can even use it as a replacement for your UNIX shell because it's so easy to interact with UNIX command line utilities.
  • He mentioned "ipython -p tutorial", but I can't figure out what it does.
  • It has better introspection, tab completion, color, syntax highlighting, and debugger integration.
  • It was inspired by Mathematica.
  • It has macros.
  • It takes care of moving content to and from your editor so you don't have to cut and paste and remove the ">>>" at the beginning of each line.
  • It can trivially lookup code definitions and docs while you're working on something.
  • It has a better version of the "dir" function.
  • It has various, useful "magic" commands.
  • Doing things like "!ls" lets you talk to the shell. In this way, it's easy to do some UNIX shell scripting.
  • It has support for timing and profiling.
  • It has a nicer version of pdb called ipdb.
  • In stack traces, it can show the syntax highlighted code as well as all the data.
  • You can use ipython to dynamically code GUIs that have event loops that would block the normal interpreter.
  • In general, ipython knows how to work with the event loops of many different libraries.


Anonymous said…
Q: He mentioned "ipython -p tutorial", but I can't figure out what it does.
A: It takes care of the ">>>" and "..." at the beginning of each line.
Michel said…
Makes it really useful to cut-and-paste examples!