bug with command line option - in 1.5.2?
Mark Jackson
mjackson at wc.eso.mc.xerox.com
Fri Jan 5 16:24:57 EST 2001
"Travis Hume" <travis.hume at tenzing.com> writes:
> 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 >
Both "python - foo < testpy.py" and "python testpy.py foo" work for me
(1.5.2 on Solaris 5.6):
yngvi> python - foo < testpy.py
foo
yngvi> python testpy.py cat
cat
Does the latter work for you?
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
The power of accurate observation is frequently called
cynicism by those who don't have it.
- George Bernard Shaw
More information about the Python-list
mailing list