Shebang

It's common on Unix-like systems to have the first line of a script include a special comment, #!, called a shebang. This allows the program loader to identify which interpreter should be used to run the program. Shebangs have an additional purpose of conveniently documenting at the top of a file whether the Python code therein is Python 2 or Python 3.

The exact details of your shebang command depend on the location of Python on your system. Typical Python 3 shebangs use the Unix env program to locate Python 3 on your PATH environment variable, which importantly is compatible with Python virtual environments:

#!/usr/bin/env python3
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset