3 ms·
Works all and well until you need a dependency, then you need to do all the same project setup as normal. Stopped using python for scripting for this reason
by verdverm 10mo ago
Works all and well until you need a dependency, then you need to do all the same project setup as normal.
Stopped using python for scripting for this reason
- theanonymousone 10mo agoI don't think you need any dependencies to match Bash scripting in capability.
- hsbauauvhabzb 10mo agoYou can even wrap shell / system commands in python and capture the output, so it’s basically a superset!
- kh_hk 10mo agoYou can also inline python inside shell scripts, does that make them equal sets? :) life() { python3 << EOF print(42) EOF }
- verdverm 10mo agoYaml support is required, this requires a third party package because python does not have an option in the stdlib
- GeneralMaximus 10mo agoIf you use `uv`, you can declare your dependencies at the top of a script: https://docs.astral.sh/uv/guides/scripts/#declaring-script-dependencies https://docs.astral.sh/uv/guides/scripts/#declaring-script-d... I've started using Python for many more tasks after I discovered this feature. I'm primarily a JS/TS developer, but the ability to write a "standalone" script that can pull in third-party dependencies without affecting your current project is a massive productivity boost.
- verdverm 10mo agoThen I have to install uv globally That convenience you think boosts productivity is a short term thing, using comments for dependency management is an anti pattern imo