-
Notifications
You must be signed in to change notification settings - Fork 315
"Run in interactive mode" and drag-n-drop support #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hum, I'm not expert in the dark art of Windows registery, and saw some people complaining of current WinPython registering feature ... It may take me a while to get a decision on this. |
These are just additional subkeys to the registry keys that WinPython already installs when it is "registered" with the OS. If the user chooses to keep WinPython "portable", they wouldn't be installed of course. If WinPython includes these as standard features, I won't have to instruct every user at my company who uses WinPython. They would also make WinPython easier to use for schools. |
I should also clarify that my code above is example code for your experimentation. I expect WinPython's Python code for registering to be modified to include these new features using the installation path. |
hum, now I read what @PierreRaybaut wrote: https://github.com/winpython/winpython/blob/master/winpython/associate.py I don't understand what I see, and I understand even less your patch with things like passing by, I remember there was another request on the subject: #28 |
With your tip to look at associate.py, I see the DropHandler is already included in WinPython. Therefore, I withdraw that part of my request. For WinPython users who would like to learn how to use this great DropHandler feature, here is some explanation: My remaining request to support "Run in interactive mode" can be tested with the following file. Maybe name it "RunInInteractiveMode.reg" so the file will be associated by Windows with the regedit.exe application.
To understand how associate.py works, it may be helpful to view its output in the Windows registry. Run regedit.exe and view the following keys, which are like folders for parameters: Hopefully, this sheds some light on the dark art of the Windows Registry (database). |
Request #28 makes sense for Python(x,y), where only one Python version exists on a PC. WinPython supports multiple Python versions/environments installed, and request #28 would break this. Registering one WinPython version with the OS only associates .py, .pyc, .pyo and .pyw extensions with handler applications with a particular WinPython version. "WinPython Command Prompt.exe" is used to modify the path and add environment variables for one cmd shell process. If the control panel changed the environment variables as suggested in #28, "WinPython Command Prompt.exe" for a second WinPython version wouldn't work. Pierre designed WinPython very well. |
Indeed. I stiil don't know if and how I should patch the existing |
I use the drag-n-drop feature dozens of times a day, while I use "Run in interactive mode" rarely. I now understand WinPython already has the first feature, and the second feature is not a high enough priority for me to reverse-engineer The registry modifications I suggested just add another right-click application association with .py, .pyc, .pyo and .pyw extensions in Windows Explorer. I feel clear that this is in the spirit of WinPython's model of optionally registering one Python version, while not breaking other Python versions/environments. I think the feature would be most useful for schools. Since this modification is proving difficult for you, I suggest removing this issue from the next release milestone and tagging it with "help wanted". This gives an opportunity to contribute for some kind soul who wants to practice at Python and learn about the Windows registry. |
historic WinPython registration is back in Winpython-2022-04, after removing what frightens me: the "activeX" thing. I don't know if anything more and usefull si possible |
The winpython/associate.py has been totally revised this 2025-02 cycle, to make it readable.. Is there still need to add something somewhere there in 2025 ? |
Drag & drop support is cautiously re-,introduced this 2025-03 cycle, if anti-viruses do tolerate it |
Here are some Windows registry features from Python(x,y) that I find useful, and I propose them for WinPython:
Before importing the above file into regedit, register WinPython with the OS. Also, edit the paths for your WinPython installation.
I am not sure if WinPython's register_python.bat already adds the DropHandler since this registry key has been on my PC before I first registered WinPython. It is really handy to drag an input file onto a Python script and then automatically access the input file name with sys.argv[1] in the Python script.
The text was updated successfully, but these errors were encountered: