redirect output of functions to a string or file

Olivier Dagenais olivierS.dagenaisP at canadaA.comM
Tue Jul 11 23:03:43 EDT 2000


Sounds like you're looking for some tracing functionality to help you debug?

I don't think you would want ALL functions to display their output to a
file, since you may find that file grows really, really quick!

You may just want to add a "print" at the end of functions that you want to
debug, or use some class that doesn't do anything in "retail" mode, but in
"debug" mode, will print all output in a window or out to a file....

--
----------------------------------------------------------------------
Olivier A. Dagenais - Carleton University - Computer Science III


"Fernando Rodríguez" <frr at mindless.com> wrote in message
news:LBpa5.563$iT2.6319 at m2newsread.uni2.es...
> Hi!
>
>     I have several functions that return strings.  The output of these
> functions must be combined and saved into a file.
>
>     Is there a way to tell Python to "automagically" redirect the output
> of _all_ functions to a string or file? O:-)
>
> TIA
> ---------------------------------------
> Fernando Rodríguez
>
>





More information about the Python-list mailing list