Reputation: 97
I am writing a text based game in python that requires uses a lexicon. I need to be able to leave the text file open while the rest of the program is running. Is there any way to do this, or does the opened file have to be closed before the program can continue. Here is my earlier question that describes why I need the opened file: Open a text file window using Python
Upvotes: 0
Views: 634
Reputation: 9714
Based on your other question, you are using os.system not to open the file specifically, but to open an external editor to display/edit a file.
os.system is a "synchronous" call, which in this case means that the python code after os.system wont run until the edit program exits.
if you want your code to run while the editor is running - then you will need to find another way to do that :
Upvotes: 1