I use print statements to generate a trace file with no problems. Maybe
file vs. console explains the difference, but it might also be because I
write unbuffered:
# param3==0 makes stdout unbuffered
sys.stderr = sys.stdout = open(fname, 'w', 0)
print '%s trace started on %s (frozen=%s)' % (identity.IDENTITY,
time.ctime(time.time()), hasattr(sys, 'frozen'))
print utils.GetOS()
HTH, Phil