-
Overview
From google styleguide, Most
.py
files do not need to start with a#!
line.Start the main file of a program with
#!/usr/bin/env python3
(to support virtualenvs) or#!/usr/bin/python3
per PEP-394.This line is used by the kernel to find the Python interpreter, but is ignored by Python when importing modules.
It is only necessary on a file intended to be executed directly.
-
Shebang
A shebang(sha-bang, hashbang, pound-bang, hash-pling) is the character sequence consisting consisting of the characters number sign and exclamation m
理解Shebang line: #!/usr/bin/python3
最新推荐文章于 2024-05-24 12:03:44 发布