how to open txt file using subprocess python code example Example: python os open notepad import os os.system("C:\\Windows\\notepad.exe")