[EMAIL PROTECTED] wrote: > After some trials I found that put "os.close(1)" before calling the > function will depress the output. In fact, "os.close(1)" closed > standard output, but I don't know how to open it again after the function's > execution.
Try this: fd = os.dup(1) os.close(1) sys.stdout = os.fdopen(fd) It's poor design and extremely inconsiderate for a library to print to stdout except as an overridable default. (Not to mention it gives ammo to people who want dynamically scoped globals.) A long term solution might be to haggle the author to stop being such a jerk. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list