redirect output of functions to a string or file
Alex Martelli
alex at magenta.com
Tue Jul 11 04:40:41 EDT 2000
"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:-)
Redirect? So that, for example:
a=f()
would NOT actually set a, but rather (leave it as before? or what
else?) and instead place f()'s return value somewhere else? That
seems like a tall order to me, and I don't understand how it would
help -- surely you're using the value of a in later code, so if it does
not get set this will affect your code's logic...?
Alex
More information about the Python-list
mailing list