stdout and buffer

I just realized my std output comes out only when my wxPython program close.
This is not good for log! Need to disable cache!

import sys 
myFile= open( "a.log", "w", 0 ) 
sys.stdout= myFile
 

OR

sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
 
最終更新:2009年07月08日 13:50
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。