Hey List,

In Perl, I can manipulate a special variable called $| to control buffered output, even on web pages, so I can watch something run (like CGI processes reading files or running system commands) as Perl processes it (pseudo real-time), as opposed to languages like PHP which buffers all output and draws it all in one shot.

I saw this on Stack Overflow, and was curious if this is still the best practice to do the same thing in Python?

sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)


Thanks,
Ian

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to