Python scripts in /usr/bin

后端 未结 5 494
野的像风
野的像风 2021-02-04 04:07

I\'m writing a pretty basic application in python (it\'s only one file at the moment). My question is how do I get it so the python script is able to be run in /usr/bin without

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-04 04:34

    Shebang?

    #!/usr/bin/env python
    

    Put that at the beginning of your file and you're set

提交回复
热议问题