4 ms·
If somebody else is running the code, it likely is packaged. Every python packaging I know allows to specify version of python to use so IMHO that's what should
by takeda 4y ago
If somebody else is running the code, it likely is packaged. Every python packaging I know allows to specify version of python to use so IMHO that's what should be used.
- tyingq 4y ago>If somebody else is running the code, it likely is packaged. Partially because people avoid Python for things like installers and simple sharable single file scripts...because of this. There are ways around it in many other scripting languages. And a fairly good number of popular "single file scripts" that get shared, like mysqltuner (perl), adminer (php), etc.
- takeda 4y agoHmm in those instances I think this would be much better solution: https://nixos.wiki/wiki/Nix-shell_shebang#Python https://nixos.wiki/wiki/Nix-shell_shebang#Python Instead of checking whether proper version is used, why not just ensure it runs on right now (and perhaps includes needed dependencies)
- tyingq 4y agoOf course, there's the catch-22 that they probably don't have nix-shell.