Quote:As snippsat wrote:
It will all depend on what file association .py is set to in Windows.
If i set file association in Windows for .py to Notepad++,then this code will open hello.py in Notepad++.
After associating Notepad++ to Python file,
import os
os.startfile(<absolute path of the python file>) #Absolute path: Only incase os.chdir is not being used
If I run this code, then it is opening in Notepad++
Same happens with
import webbrowser
webbrowser.open(<absolute path of python file>)