Im learning python but I dont understand what this line does? or how many options there is?
Asked
Active
Viewed 593 times
1 Answers
1
This line is called a shebang and it tells the kernel which interpreter to use on the script.
For example, if a script is named with the path path/to/script
, and it starts with the line #!/bin/sh
, then the program loader is instructed to run the program /bin/sh
, passing path/to/script
as the first argument.
In your instance, the kernel will use whatever /usr/bin/python
points to (I think it is by default python3.6
).
/usr/bin/python
should be Python 2.7. This is per PEP 394, which says the commandpython
should be Python 2. – wjandrea Mar 21 '19 at 16:18