Re:Self-contained Python scripts with uv
by seabrookmx on Sunday March 30, 2025 @12:11AM
(#43521266)
I haven't done dev on windows in many years, but IIRC windows doesn't have shebang support.
[ Parent
| on HN ]
Re:Self-contained Python scripts with uv
by magicalhippo on Sunday March 30, 2025 @12:35AM
(#43521382)
But it does support registering extension handlers[1], so if you name your scripts with say .pyuv and register "uv run --script %1", or whatever it would take to run uv, as the handler of .pyuv files, it should work. Unless uv does something funky that is.
You could do this during an installation step, for example.
[1]: https://learn.microsoft.com/en-us/windows/win32/shell/fa-fil...