It seems to me like the files run the same without that line.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- How to get the return code of a shell script in lu
- Evil ctypes hack in python
If you're running your script in a virtual environment, say
venv
, then executingwhich python
while working onvenv
will display the path to the Python interpreter:~/Envs/venv/bin/python
Note that the name of the virtual environment is embedded in the path to the Python interpreter. Therefore, hardcoding this path in your script will cause two problems:
Therefore, to add to Jonathan's answer, the ideal shebang is
#!/usr/bin/env python
, not just for portability across OSes but for portability across virtual environments as well!