Re: [Tutor] saving output data in a file

2009-12-06 Thread Dave Angel
spir wrote: class Out(file): def __init__(self, filename, toconsole=True, numberlines=True): file.__init__(self, filename, 'r') print self # debug output to console self.toconsole = toconsole # line numberi

Re: [Tutor] saving output data in a file

2009-12-05 Thread spir
Dave Kuhlman dixit: > On Fri, Dec 04, 2009 at 01:13:42PM +0530, Prasad Mehendale wrote: > > I am a beginner. I want to save the output data of the following programme > > in > > a file through the programme. Please suggest me the way. I am using Python > > 2.3.3 on mandrake linux 10 and using

Re: [Tutor] saving output data in a file

2009-12-04 Thread Dave Kuhlman
On Fri, Dec 04, 2009 at 01:13:42PM +0530, Prasad Mehendale wrote: > I am a beginner. I want to save the output data of the following programme in > a file through the programme. Please suggest me the way. I am using Python > 2.3.3 on mandrake linux 10 and using "Idle" to save the output to a file

Re: [Tutor] saving output data in a file

2009-12-04 Thread spir
Prasad Mehendale dixit: > I am a beginner. I want to save the output data of the following programme in > a file through the programme. Please suggest me the way. I am using Python > 2.3.3 on mandrake linux 10 and using "Idle" to save the output to a file > presently. > Thanks in advance. Yo

Re: [Tutor] saving output data in a file

2009-12-04 Thread Alan Gauld
"Senthil Kumaran" wrote Instead of print '(Pole*RPM) product for various values of conductors/slot is: \n', polerpm You will do msg = '(Pole*RPM) product for various values of conductors/slot is: \n', polerpm You would need to do a bit more since polerpm will not automatically be appen

Re: [Tutor] saving output data in a file

2009-12-04 Thread Alan Gauld
"Prasad Mehendale" wrote I am a beginner. I want to save the output data of the following programme in a file through the programme. The easiest way is to use file redirection at run-time $ python foo.py > results.txt This will work on Linux/MacOS/Windows The alternatives are 1) open a f

Re: [Tutor] saving output data in a file

2009-12-04 Thread Senthil Kumaran
On Fri, Dec 04, 2009 at 01:13:42PM +0530, Prasad Mehendale wrote: > I am a beginner. I want to save the output data of the following programme in > a file through the programme. Please suggest me the way. I am using Python > 2.3.3 on mandrake linux 10 and using "Idle" to save the output to a file

[Tutor] saving output data in a file

2009-12-03 Thread Prasad Mehendale
I am a beginner. I want to save the output data of the following programme in a file through the programme. Please suggest me the way. I am using Python 2.3.3 on mandrake linux 10 and using "Idle" to save the output to a file presently. Thanks in advance. #programme to calculate various parame