Again: Please hear my plea: print without softspace

Peter Maas fpetermaas at netscape.net
Thu Mar 4 10:46:48 EST 2004


David MacQuigg schrieb:
> Ruby also allows you to redefine its built-in classes, so if you need
> that level of flexibility, this language may be a better choice.

Martin's redefined class does what he wants but sys.stdout is an
instance of file. All he has to do is close the predefined stdout
and open it again:

sys.stdout.close()
sys.stdout = MultiArgWriteFile('/dev/tty', 'a')

or whereever he wants sys.stdout to point to. Of course switching
the language on each problem is also an option. ;-)

Mit freundlichen Gruessen,

Peter Maas

-- 
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas at mplusr.de
-------------------------------------------------------------------



More information about the Python-list mailing list