-
Notifications
You must be signed in to change notification settings - Fork 416
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
feature:py launcher semantics #152
Comments
@thejcannon did you got any change with play around with |
@kirankotari Yeah. Some background here, I <3 When we "switch" to pure- For the time being, we'll just educate people on how |
@thejcannon got it. I will look into it. |
I know it's been several months, were you able to make any headway? |
I actually decided to spend a little time looking into this. I think the double-click launcher semantics might be trivial! First, a simple batch file to add the right registry keys tells Windows to associate reg add "HKCR\.py" /t REG_SZ /d Python.Pyenv
reg add "HKCR\Python.Pyenv" /t REG_SZ /d "Python Source File"
reg add "HKCR\Python.Pyenv\shell\open\command" /t REG_SZ /d "\"%USERPROFILE%\\.pyenv\\pyenv-win\\shims\\python.bat\" \"%%1\""
reg add "HKCR\Python.Pyenv\DefaultIcon" /t REG_SZ /d "<path-to-ico>" And then double-clicking or calling ... I might make a PR if you don't mind shepherding it along. |
(Oh and you might need to refresh the icon cache: https://www.winhelponline.com/blog/refresh-icon-cache-windows-7-quickly/) |
#198 led me to PEP 514, which
Then we'd have all the following:
I honestly think if we had that |
I sniffed around I don't think that's an awful idea (aside from requiring a compiler). |
What needs doing here beyond just extending the registry checks to a few extra keys and ensuring someone/CI actually builds the modified |
People like the Windows
py
launcher for it's shebang and program-registration semantics (.py
files are registered as being run bypy
, so I can just double-click the file).I'd love to see
py
play nicely withpyenv-win
(A bit of a stretch as that'd likely involve a PEP of some kind),pyenv-win
somehow plug intopy
withoutpy
changes, or a similar utility which is fullypyenv-win
aware.For reference,
py
source is here: https://github.com/python/cpython/blob/master/PC/launcher.cThe text was updated successfully, but these errors were encountered: