Re: how to stop info output on screen
- From: Ido.Yehieli@xxxxxxxxx
- Date: 30 Sep 2005 05:04:19 -0700
more on the subject: your "print" statments will also be written to
that file that sys.stdout directs to, so maybe that wasn't exactly the
solution you wanted to hear.
ok, not the nicest solution but maybe it will help you anyway:
bind sys.stdout at the begining of the program to a file (don't forget
to save it first! let's say stdout = sys.stdout;
sys.stdout=file('myLogFile.dat','w') ), and write your own print
funktion that goes something like that:
def printToConsole(stringToPrint,oldStdOut):
____sys.stdout=oldStdOut
____print stringToPrint
____sys.stdout=file('myLogFile.dat','w')
then when you want to print to the console, use this function instead
of the print statment. all the rest will go to 'myLogFile.dat'
Cheers,
Ido.
.
- References:
- how to stop info output on screen
- From: midday . hu
- how to stop info output on screen
- Prev by Date: Re: how to stop info output on screen
- Next by Date: Re: Straight line detection
- Previous by thread: Re: how to stop info output on screen
- Index(es):