# [python][subprocess]用subprocess的Popen方法開啟記事本並等待 ###### tags: `Python` https://stackoverflow.com/questions/6178154/open-a-text-file-using-notepad-as-a-help-file-in-python https://stackoverflow.com/questions/27097674/blocking-until-a-file-is-closed-in-python ```python process = subprocess.Popen( ["notepad.exe","path\to\ur\txt\file.txt"] ) process.wait() print("file closed") ```