Making the Zen of Python more useful
xpythonist at yahoo.com.br
Fri Apr 2 23:35:51 CEST 2004
>>> import sys
>>> t,sys.stdout = sys.stdout, file('/dev/null', 'w')
>>> from this import s
>>> sys.stdout = t
u"The Zen of Python..."
--- Andrew Henshaw <andrew.henshaw at gtri.gatech.edu> escreveu: > In
article <mailman.284.1080928147.20120.python-list at python.org>,
> n3613 at klaff.org says...
> >from this import s
> Thanks for the response. Unfortunately, this still has the
> desired) behavior of the text being printed to stdout. For the less
> case of using the text to feed some test code, I don't think that is
> Unfortunately, I can't think of a way to accomplish both by simply
> the 'this' module (for future releases). Adding another module would
> do it;
> but, I was hoping someone could suggest a better way.
Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora:
More information about the Python-list