making a commandline alias to a python file in a pipenv project

后端 未结 3 1431
谎友^
谎友^ 2021-01-06 21:01

I\'ve been making a python project using pipenv, and I want to be able to run it in a terminal from any location on my (linux) system. Specifically, say I have the following

3条回答
  •  余生分开走
    2021-01-06 21:40

    You can just use

    #!/usr/bin/env pipenv-shebang
    

    in your script after you install my pipenv-shebang package:

    pip install pipenv-shebang
    

提交回复
热议问题