Answers for "how to open an external file in 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 open an external file in python"

Python Answers by Framework

Browse Popular Code Answers by Language