Re:Self-contained Python scripts with uv
by dharmab on Sunday March 30, 2025 @01:06PM
(#43525686)
Interesting. The workflow I've been using skips the CPython installer and only uses uv.
[ Parent
| on HN ]
Windows doesn't support shebang lines as you probably know, but if you associate uv with .py files you'll get the same result.
I think it should be something like this:
ftype Python.File=C:\Path\to\uv.exe run %L %*
If you don't use the CPython installer the Python.File file type might not be defined, so you might need to set that with `assoc` first: assoc .py=Python.File