Gribouilli Wrote:It will all depend on what file associationMalt Wrote:it is actually running and it is not allowing to edit the code.This is in contradiction with fishhook's reply above. Now the problem is to understand what's going on. Does it do the same if you doimport webbrowser webbrowser.open(<absolute path to your python file>)
.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++.import webbrowser webbrowser.open(r'E:\div_code\hello.py')If i chance back to
root\python.exe
will try to run hello.py.Gribouillis Wrote:Also what happens if you call
import os os.startfile("spam.py", "edit")
edit
is removed from most newer Windows version.It will all fail with
.py
.import os # Work with know print formates format like txt,pdf,images... os.startfile("test.txt", "print") # Fail os.startfile("hello.py", "print")