bug with command line option - in 1.5.2?

Emile van Sebille emile at fenx.com
Fri Jan 5 16:00:45 EST 2001


doing

python testpy.py foo

will print 'foo' to stdout.

--

Emile van Sebille
emile at fenx.com
-------------------


"Travis Hume" <travis.hume at tenzing.com> wrote in message
news:3a561b87$1_1 at news.nwlink.com...
> Given a simple python script
>
>
> import sys
> print sys.argv[1]
>
>
> Shouldn't the command
>
> python - foo < testpy.py
>
> print the word foo to stdout?  Instead I'm getting this
>
> ~/tmp >python - foo < testpy.py
> python: can't open file 'foo'
> ~/tmp >
>
> foo should be parsed as an argument to the script read
from stdin.  If
> I'm missing something please tell me so I can get here
document scripts
> working with python.
>
> python v1.5.2
> zsh
> linux 2.4
>
> --
> Travis Hume
> Software Engineer
> Tenzing Communications Inc.
> travis.hume at tenzing.com





More information about the Python-list mailing list