write in file is not complete without quitting the IDLE(Python GUI)
Posted
by Yi-Ping
on Stack Overflow
See other posts from Stack Overflow
or by Yi-Ping
Published on 2010-04-17T14:39:13Z
Indexed on
2010/04/17
14:43 UTC
Read the original article
Hit count: 295
I want to write something in a file. for example,
fo=open('C:\Python\readline_test.txt','a') for i in range(3): st='abc'+'\n' fo.write(st) fo.close
then I open this python file in IDLE, and click "Run Module". There is no error message but I find the writing is not complete if I didn't quit IDLE. How can I complete the file writing without quitting the IDLE? Thanks.
(I use Python 2.6.2 on Windows XP.)
© Stack Overflow or respective owner