mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Update shebang line
This shebang line is more portable, as the user may not have python installed in /usr/local/bin/python. Also, according to PEP 486, the line makes the Python Launcher aware of virtual environments.
This commit is contained in:
parent
70d6b7d4b8
commit
b4e1659acd
|
@ -1506,9 +1506,8 @@ No: <span class="external"></span>def foo(a, b=FLAGS.my_thing): # sys.argv has
|
||||||
Most <code>.py</code> files do not need to start with a
|
Most <code>.py</code> files do not need to start with a
|
||||||
<code>#!</code> line. Start the main file of a
|
<code>#!</code> line. Start the main file of a
|
||||||
program with
|
program with
|
||||||
<code>#!/usr/bin/python</code> with an optional single digit
|
<code>#!/usr/bin/env python</code> with an optional single digit
|
||||||
<code>2</code> or <code>3</code> suffix per
|
<code>2</code> or <code>3</code> suffix.
|
||||||
<a href="https://www.python.org/dev/peps/pep-0394/">PEP-394</a>.
|
|
||||||
</DIV>
|
</DIV>
|
||||||
<DIV class=""><DIV class="stylepoint_body" name="Shebang_Line__body" id="Shebang_Line__body" style="display: none">
|
<DIV class=""><DIV class="stylepoint_body" name="Shebang_Line__body" id="Shebang_Line__body" style="display: none">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user