io - Python runs but won't write to file -


i want print variable file word_filter_output.txt. code runs fine , variable e prints console if want not print file. no errors come up. file left 0 bytes.

>>>with open("word_filter_output.txt", "w") f: >>>    print(e, file = f) 

it works given me (python 3.3.4);

depending on else doing, may need force-flush it, ie

with open("word_filter_output.txt", "w") f:     print(e, file=f, flush=true) 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -