Re: [Tutor] saving output data in a file

2009-12-06 Thread Dave Angel
spir wrote: snip 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

Re: [Tutor] saving output data in a file

2009-12-05 Thread spir
Dave Kuhlman dkuhl...@rexx.com 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

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

Re: [Tutor] saving output data in a file

2009-12-04 Thread Alan Gauld
Prasad Mehendale prachit...@gmail.com 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

Re: [Tutor] saving output data in a file

2009-12-04 Thread Alan Gauld
Senthil Kumaran orsent...@gmail.com 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

Re: [Tutor] saving output data in a file

2009-12-04 Thread spir
Prasad Mehendale prachit...@gmail.com 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

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

[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