gratuitous new features in 2.0
Piet van Oostrum
piet at cs.uu.nl
Fri Aug 25 16:04:12 EDT 2000
>>>>> Niels Diepeveen <niels at endea.demon.nl> (ND) writes:
ND> I would much prefer making redirecting output from the print statement
ND> easier by separating it from sys.stdout. Why not provide a function
ND> sys.printto() [or possibly __builtin__.printto()] that will redirect
ND> output from the print statement, but does not change sys.stdout?
ND> def printto(file=None):
ND> global _print_file
ND> _print_file = file
Globals are bad. Think about the consequences for threads and exceptions.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl
More information about the Python-list
mailing list