Interactive Python

  • Just write python in a terminal window to get an interactive Python shell:
    >>> 1269*1.24
    1573.5599999999999
    >>> import os; os.getcwd()
    '/home/hpl/work/scripting/trunk/lectures'
    >>> len(os.listdir('modules'))
    60
    

  • We recommend to use IPython as interactive shell
    Unix/DOS> ipython
    In [1]: 1+1
    Out[1]: 2
    

    previousnexttable of contents