howto run a function w/o text output?

Matimus mccredie at gmail.com
Fri Jun 22 13:44:41 EDT 2007


On Jun 22, 9:56 am, dmitrey <open... at ukr.net> wrote:
> hi all,
> I have a
> y = some_func(args)
> statement, and the some_func() produces lots of text output. Can I
> somehow to suppress the one?
> Thx in advance, D.

[code]
import sys
import os

sys.stdout = open(os.devnull,"w")
[/code]




More information about the Python-list mailing list