Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Using what version of python? How will you distribute the expected version to target machines?

python has its place, but it's not without its own portability challenges and sneaky gotchas. I have many times written and tested a python script with (for example) 3.12 only to have a runtime error on a coworker's machine because they have an older python version that doesn't support a language feature that I used.

For small, portable scripts I try to stick to POSIX standards (shellcheck helps with this) instead of bash or python.

For bigger scripts, typically I'll reach for python or Typescript. However, that requires paying the cost of documenting and automating the setup, version detection, etc. and the cost to users for dealing with that extra setup and inevitable issues with it. Compiled languages are the next level, but obviously have their own challenges.



> Using what version of python? How will you distribute the expected version to target machines?

Let's focus on solving this then. Because the number of times that I've had to do surgery on horrible bash files because they were written for some platform and didn't run on mine...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: