howto run a function w/o text output?

Matimus mccredie at
Fri Jun 22 19:44:41 CEST 2007

On Jun 22, 9:56 am, dmitrey <open... at> 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.

import sys
import os

sys.stdout = open(os.devnull,"w")

More information about the Python-list mailing list