0

Im learning python but I dont understand what this line does? or how many options there is?

1 Answers1

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).

wjandrea
  • 14,236
  • 4
  • 48
  • 98
j-money
  • 2,382
  • /usr/bin/python should be Python 2.7. This is per PEP 394, which says the command python should be Python 2. – wjandrea Mar 21 '19 at 16:18
  • @wjandrea Thanks for this :D " end users should be aware that python refers to python3 on at least Arch Linux" I failed to read past python3 when I was searching around for the default – j-money Mar 21 '19 at 21:28