for the line of code you given,<div><br><div><div><font class="Apple-style-span" color="#330099">print type(sys.stdin), sys.stdin</font></div><div><font class="Apple-style-span" color="#330099"><br></font></div><div><font class="Apple-style-span" color="#330099">the output is:</font></div>
<div><font class="Apple-style-span" color="#330099"><class 'idlelib.rpc.RPCProxy'> <idlelib.rpc.RPCProxy object at 0x00BE8090></font></div><div><font class="Apple-style-span" color="#330099"><br></font></div>
<div>there is no change.</div><div>I have tried it in  python2.6 on windows platform.</div><div><br></div><div>Thanks,</div><div>Siva</div><div><br><br><div class="gmail_quote">On Sat, Dec 5, 2009 at 12:57 PM, Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">> On Sat, Dec 5, 2009 at 11:54 AM, Chris Rebert <<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>> wrote:<br>

>><br>
>> On Fri, Dec 4, 2009 at 9:37 PM, Siva B <<a href="mailto:sivaits4u@gmail.com">sivaits4u@gmail.com</a>> wrote:<br>
>> > Hi all,<br>
>> ><br>
>> > I wrote a program to read some data through standard input and write in<br>
>> > a<br>
>> > file.<br>
>> > the following code works fine in linux.<br>
>> > but its giving ArgumentError in windows.<br>
>><br>
>> There's no such error in Python; you're thinking of Ruby.<br>
>> Unless you give the /actual/ error (with message) and full traceback,<br>
>> there's not much we can do to help you besides just guess.<br>
>><br>
>> <snip><br>
>> > file=open('data.txt','w')<br>
>><br>
>> Don't use `file` as a variable name, you're shadowing the built-in type.<br>
>><br>
>> > and what is the command in windows for EOF (like Cntrl D in linux)<br>
>><br>
>> <a href="http://tinyurl.com/yggsby3" target="_blank">http://tinyurl.com/yggsby3</a><br>
>> The *very first result* has the answer in its 6th sentence.<br>
<br>
</div><div class="im">On Fri, Dec 4, 2009 at 11:13 PM, Siva B <<a href="mailto:sivaits4u@gmail.com">sivaits4u@gmail.com</a>> wrote:<br>
> Hi Chris,<br>
> Thanks for you reply.<br>
> The error log is here for my above program in windows:<br>
><br>
> Traceback (most recent call last):<br>
>   File "C:\Documents and Settings\user\Desktop\t1.py", line 3, in <module><br>
>     orig_source = sys.stdin.read()<br>
> AttributeError: read<br>
<br>
</div>Okay, that Shouldn't Be Happening (tm). Add the following before line<br>
3 and post the output:<br>
<br>
print type(sys.stdin), sys.stdin<br>
<br>
And while we're at it, what version of Python are your running?<br>
<div><div></div><div class="h5"><br>
Cheers,<br>
Chris<br>
--<br>
<a href="http://blog.rebertia.com" target="_blank">http://blog.rebertia.com</a><br>
</div></div></blockquote></div><br></div></div></div>