[IPython-user] python vs. ipython
Ville Vainio
vivainio at gmail.com
Fri Jan 27 14:51:49 CST 2006
On 1/27/06, Peter Teuben <teuben at astro.umd.edu> wrote:
> > I think I fixed this already, did you try the version before my fix?
>
> perhaps i was behind in svn, i tried again. I'm at revision 1089.
> Or perhaps i was confused. As long as one is in the section
>
> if __name__ == '__main__' :
> print sys.argv[]
>
> it will print "foo.py arg1 arg2", but as soon as one is in the
> interactive shell, it goes to "-c".
Hmm, I get the expected behaviour;
I have a file t.py (import sys; print sys.argv) and I do:
[~/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
Are you sure you ran setup.py install after svn up?
--
Ville Vainio - http://tinyurl.com/2prnb
http://vainio.blogspot.com
More information about the IPython-user
mailing list