2 ms·
>Put this at the start of your script (which has to end in .py): Yes, that format is specified by PEP 723 "Inline script metadata" (https://peps.python.org/pep
by zahlman 2y ago
>Put this at the start of your script (which has to end in .py):
Yes, that format is specified by PEP 723 "Inline script metadata" (https://peps.python.org/pep-0723/ https://peps.python.org/pep-0723/). The cause was originally championed by Paul Moore, one of the core developers of Pip, who authored the competing PEP 722 (see also https://discuss.python.org/t/_/29905 https://discuss.python.org/t/_/29905) and was advocating for the general idea for long before that.
It's also supported by Pipx, via the `run` subcommand. There's at least one pull request to put it directly into Pip, but Moore doesn't seem to think it belongs there.
- stavros 2y agoYep! It's just that uv installs everything fast enough to run scripts comfortably.