[IPython-user] python vs. ipython
Peter Teuben
teuben at astro.umd.edu
Fri Jan 27 15:30:31 CST 2006
> [~/ipython]|4> python ipython.py -p pysh -c 'foo()' t.py arg1 arg2
> Welcome to pysh, a set of extensions to IPython for shell usage.
> help(pysh) -> help on the installed shell extensions and syntax.
>
> ['t.py', 'arg1', 'arg2']
> ---------------------------------------------------------------------------
> exceptions.NameError Traceback (most
> recent call last)
>
> /home/ville/ipython/<ipython console>
>
> NameError: name 'foo' is not defined
>
ah, but after this, in interactive mode, when you type sys.argv, it will show
['-c']. Not that i care, it's an ipython feature. I was merely wondering if this
is someting to worry about. In some sense, you're back in the previous ipython
mode (documented) that when -c is used, the sys.argv is reset after the -c
command has been executed.
peter
More information about the IPython-user
mailing list