[EMAIL PROTECTED] wrote:

>         I dont want the outputs of print to be displayed on the console
> since it is used my fellow-workers
>         But i need those prints for debugging purpose

import sys
sys.stdout = open("my_debugging_output.txt", "w")

Or you can replace sys.stdout with any object having
a write() method which does whatever you want with
the output.

You can similarly replace sys.stderr to capture
output written to standard error.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,       
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to