read from standard input
Siva B
sivaits4u at gmail.com
Sat Dec 5 00:37:48 EST 2009
Hi all,
I wrote a program to read some data through standard input and write in a
file.
the following code works fine in linux.
but its giving ArgumentError in windows.
Code:
import sys
orig_source = sys.stdin.read()
file=open('data.txt','w')
file.write(orig_source)
file.close()
please post some solution .
and what is the command in windows for EOF (like Cntrl D in linux)
thanks in advance
Siva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091205/c263d3c4/attachment-0001.html>
More information about the Python-list
mailing list