Piping data into script under Win32
runes
rune.strand at gmail.com
Fri Apr 15 22:43:37 EDT 2005
You being so sure about what you were saying, was what I needed.
Thanks!
Under Windows, I'm used to rely on the PATHEXT env. variable, so I
typically don't write "python scriptname.py args", but just "scriptname
args".
So:
type countlines.py | python countlines.py = Success
type countlines.py | countlines.py = Failure
Why doesn't the latter work?
Traceback:
F:\groks>type countlines.py | countlines.py
The process tried to write to a nonexistent pipe.
Traceback (most recent call last):
File "C:\groks\countlines.py", line 2, in ?
data = sys.stdin.readlines()
IOError: [Errno 9] Bad file descriptor
More information about the Python-list
mailing list