I could add #! / Usr / bin / python at the beginning of the python script and add this script to PATH to run it as a command.
But can someone explain to me what “#” and “!” Do? mean separately in python and what other language has this mechanism? Thanks
This is a shebang string and #! magic numbers that are interpreted by the program loader on unix systems and are used to run the script interpreter.
#, - ; Python, . Unix, , /usr/bin/python, , .
#
/usr/bin/python