← Go Back
The path passed as argument can be relative (as is the example) or absolute.
How to Open a File With Its Default Program
On Windows systems, Python provides the standardos.startfile()
function.from os import startfile
# Launch file.txt (probably with notepad)
startfile("file.txt")
The path passed as argument can be relative (as is the example) or absolute.
🐍 You might also find interesting: