I'm writing a python script in which I want to
- Create and subsequently open a text file using the user's system's default text editor.
- Wait for the user to add text to that file, save the file, and close the text editor.
- Read from the file that the user has saved.
I have already completed Step 1, but I don't know how to begin with Step 2. Broadly speaking, how would I go about pausing execution of the script while the user adds input to the text file and then restart execution upon exit from the text editor?
$EDITORin a subprocess and then just read the file normally after it completes.input('Press enter after you have made changes to the file)which is a crude way of "pausing" your program so that the user makes his/her changes