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

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: >0x00BE8090> > > there is no change. > I have tried it in python2.6 on windows platform. > > Thanks, > Siva > How did you run this on Linux? How d

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: 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 wrote: > > On Sat, Dec 5, 2009 at 11:54 AM, Chris Rebert wrote: > >> > >> On F

Re: read from standard input

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

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 orig_source = sys.stdin.read() AttributeError: read Regards, Siva On Sat, Dec 5, 2009 at 11:54 AM, Chr

Re: read from standard input

2009-12-04 Thread Chris Rebert
On Fri, Dec 4, 2009 at 9:37 PM, Siva B 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 Ruby. Unless you g

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 s