Answers for "how to external open file with python"

1

how to open an external file in python

import subprocess    

path_to_notepad = 'C:\Windows\System32\notepad.exe'
path_to_file = 'C:\Users\Desktop\hello.txt'

subprocess.call([path_to_notepad, path_to_file])
Posted by: Guest on October-24-2021

Code answers related to "how to external open file with python"

Python Answers by Framework

Browse Popular Code Answers by Language