The Shebang Line should be the first line of your python program.
This is what Automate the Boring Stuff with Python author Al Sweigart says about the Shebang line.
The first line of all your Python programs should be a shebang line, which tells your computer that you want Python to execute this program. The shebang line begins with #!, but the rest depends on your operating system.You will be able to run Python scripts from IDLE without the shebang line, but the line is needed to run them from the command line.
- On Windows, the shebang line is #! python3.
- On OS X, the shebang line is #! /usr/bin/env python3.
- On Linux, the shebang line is #! /usr/bin/python3.
No comments:
Post a Comment