[Python] How do I turn a Python program into a CLI without having to type python3 to execute?...

Discussão em 'Python' iniciado por Stack, Fevereiro 13, 2025.

  1. Stack

    Stack Membro Participativo

    Instead of typing

    $ python3 Program.py -<flags> arguments, etc


    I want to be able to DL the git clone and then be able to type

    $ Program -<flags> arguments, etc
    # program name without the .py extension


    I've seen other programs have .yaml files, req.txt files and dockerized them but I can't find anything that shows me how to do this. All the tutorials and guides have stopped short of how to make them simple command line programs.

    I've done all the argparse, etc but I'm looking for a guide or some instruction of how to run it without having to nav to the dest folder

    Continue reading...

Compartilhe esta Página