Re: read from standard input

2009-12-05 Thread Siva B
for the line of code you given, print type(sys.stdin), sys.stdin the output is: class 'idlelib.rpc.RPCProxy' idlelib.rpc.RPCProxy object at 0x00BE8090 there is no change. I have tried it in python2.6 on windows platform. Thanks, Siva On Sat, Dec 5, 2009 at 12:57 PM, Chris Rebert

Re: read from standard input

2009-12-05 Thread Rami Chowdhury
On Saturday 05 December 2009 01:20:12 Siva B wrote: for the line of code you given, print type(sys.stdin), sys.stdin the output is: class 'idlelib.rpc.RPCProxy' idlelib.rpc.RPCProxy object at 0x00BE8090 there is no change. I have tried it in python2.6 on windows platform. Thanks,

Re: read from standard input

2009-12-05 Thread Bujji
what is the problem you faced in running it on Linux or windows we'll use IDLE only on linux platform like this also you can run see below ubu...@siva:~/Desktop$ python Python 2.6.2 (r262:71600, Oct 7 2009, 11:27:27) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type help, copyright, credits or

read from standard input

2009-12-04 Thread Siva B
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

Re: read from standard input

2009-12-04 Thread Chris Rebert
On Fri, Dec 4, 2009 at 9:37 PM, Siva B sivait...@gmail.com wrote: 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. There's no such error in Python; you're thinking of

Re: read from standard input

2009-12-04 Thread Siva B
Hi Chris, Thanks for you reply. The error log is here for my above program in windows: Traceback (most recent call last): File C:\Documents and Settings\user\Desktop\t1.py, line 3, in module orig_source = sys.stdin.read() AttributeError: read Regards, Siva On Sat, Dec 5, 2009 at 11:54

Re: read from standard input

2009-12-04 Thread Chris Rebert
On Sat, Dec 5, 2009 at 11:54 AM, Chris Rebert c...@rebertia.com wrote: On Fri, Dec 4, 2009 at 9:37 PM, Siva B sivait...@gmail.com wrote: 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