|
The normal startup, using some of its
shell-like builtins (ls) and running a program with an error in it via
the magic run command. The magic command system can be extended by the
user without needing to modify any of IPython's code, examples are
provided.
The error is shown with a verbose, colored traceback which provides
better context and easier to read information than Python's default.
|
|
Here are some of its time-saving features: TAB
completion, automatic parentheses and quotes for function calls and
information about defined variables, including details on any available
object.
You can also view the function definition line (for knowing how to call
a function), constructor information, the full source code for an
object or
directly view the file where it is defined.
|
|
You can change the style of exception
reporting to a shorter one, and when developing code, you can load the
python
debugger pdb at any uncaught exception.
The pdb debugger can walk up and down the stack, showing you details on
the status of your program when it crashed (all data is still
available). This can make for a very efficient debugging cycle without
the need for
code modification.
|
|
IPython supports an easy system for changing
configurations based on profiles. The included 'tutorial'
profile allows pasting of code which has >>> and ... at the
beginning (such as is found in the standard Python tutorial).
This is done via a mechanism for extending the processing of the user's
input, which transforms on the fly what would otherwise be invalid
python code. A similar profile is provided for doing calculations with
physical quantities
with units.
These can be used as examples to adapt IPython with your own syntax
extensions for particular problems.
|
|
It can easily interface with other systems which
support pipes-based communications.
The provided 'numeric' profile loads some utility functions for
conveniently using the Gnuplot plotting package, and can be used as an
example
for similar tasks.
|
|
IPython can show
syntax-highlighted source code for objects whose source is
available. This screenshot was generated by typing at the IPython
prompt:
import code
code??
|