Wednesday 15 January 2014

python - Does a file opened with os.system() have to be closed before the program continues? -



python - Does a file opened with os.system() have to be closed before the program continues? -

i writing text based game in python requires uses lexicon. need able leave text file open while rest of programme running. there way this, or opened file have closed before programme can continue. here before question describes why need opened file: open text file window using python

based on other question, using os.system not open file specifically, open external editor display/edit file.

os.system "synchronous" call, in case means python code after os.system wont run until edit programme exits.

if want code run while editor running - need find way :

look @ parts of subprocess module allow run external editor in way not synchronous (this called asynchronous) - utilize subprocess.popen find different way display/edit text not require external editor

python

No comments:

Post a Comment