interactive ...
Start like this:
ipython3
or
ipython3 qtconsole
or
ipython3 notebook
?
# magic functions
%quickref
qtconsole
can also be started from a running notebook session:
%qtconsole
help?
help??
%pylab inline
Populating the interactive namespace from numpy and matplotlib
# TODO: TikZ backend?
%timeit?
# or:
#%run -t
%debug?
# or:
#%run -d
%who?
You can also do crazy things like running shell commands. You can even pass Python names and use the shell output again in Python:
extension = 'ipynb'
a =! ls *.$extension
a
['intro-ipython.ipynb', 'intro-numpy.ipynb', 'intro-python.ipynb', 'simple-signals.ipynb']
d =! ddate
print(d.n)
Today is Prickle-Prickle, the 11th day of Discord in the YOLD 3180
%%bash
tmp=$(tempfile).txt
echo some text > $tmp
echo more text >> $tmp
sed -i s/text/nonsense/ $tmp
cat $tmp
rm $tmp
some nonsense more nonsense
... but it doesn't stop there, you can also run Ruby, Octave or R code!
This is of course beyond the scope of this little tutorial, if you are interested, have a look at these commands:
%%ruby
%load_ext octavemagic
%%octave
%load_ext rmagic
%%R
See also Running Scripts from IPython
Show all available "magic" functions:
%lsmagic
Available line magics: %alias %alias_magic %autocall %automagic %autosave %bookmark %cd %clear %colors %config %connect_info %debug %dhist %dirs %doctest_mode %ed %edit %env %gui %guiref %hist %history %install_default_config %install_ext %install_profiles %killbgscripts %less %load %load_ext %loadpy %logoff %logon %logstart %logstate %logstop %lsmagic %macro %magic %man %matplotlib %more %notebook %page %pastebin %pdb %pdef %pdoc %pfile %pinfo %pinfo2 %popd %pprint %precision %profile %prun %psearch %psource %pushd %pwd %pycat %pylab %qtconsole %quickref %recall %rehashx %reload_ext %rep %rerun %reset %reset_selective %run %save %sc %store %sx %system %tb %time %timeit %unalias %unload_ext %who %who_ls %whos %xdel %xmode Available cell magics: %%! %%HTML %%SVG %%bash %%capture %%debug %%file %%html %%javascript %%latex %%perl %%prun %%pypy %%python %%python3 %%ruby %%script %%sh %%svg %%sx %%system %%time %%timeit %%writefile Automagic is ON, % prefix IS NOT needed for line magics.
IPython can display all kinds of media and it can even handle the HTML5 <audio>
tag.