kanchy kang wrote: > > I don't think redirecting stdout to a file is a good resolution. Nobody is suggesting: python program.py >output or program.py >output
What is being suggested is: import sys import module original, sys.stdout = sys.stdout, open('output', 'w') try: module.main() finally: result, sys.stdout = sys.stdout, original size = result.tell() result.close() print size, 'bytes written to file "output"' If, however, you want everyone else to conform to your personal idea of "best practices," then hire them and tell them to do it your way. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list