Python shebang
Wincent Balin
Posted on June 15, 2019
Currently, in the interregnum where Python 2 and Python 3 may co-exist on the same system, the PEP 0394 recommendations for the shebang line in Python programs run in short like this:
- Use
#!/usr/bin/env
before Python interpreter - Use
#!/usr/bin/env python
only for programs that work with both Python 2 and Python 3 - If your program runs with Python 3 only, replace
python
in the previous line withpython3
- Else, for Python 2-based programs, replace
python
withpython2
💖 💪 🙅 🚩
Wincent Balin
Posted on June 15, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
devops Mastering Packaging and devlopment: Packaging and Running Apps on Gunicorn.
November 29, 2024