I have installed the Canopy Python package, and when I double-click a python file it opens the Canopy editor. I want clicking the file to run it, not edit it. I have changed the file properties to Type of file: PY file (.py) / Opens with: python.exe
but it doesn't work. Double clicking the file flashes a cmd window for a split second but does not run the file, presumably because it's starting python without giving it a filename.
Note: in a cmd window, python file.py
runs the file just fine. And assoc .py
says .py=Enthought.Canopy
, not the expected something like .py=pyfile
.
Note2: Association of Python files in Windows not working says to do a "shift right-click" on the file, but I get no better options with the shift than with just a right-click by itself.
The properties window has no obvious way to tell Windows to run the file with python.exe %s
, which is what I assume is needed. How does one set a file association that will actually run the file?