I want to create a set of command line utilities in python that will be used as follows:
python utility.py command1 -option arg
Very similar to django control commands. Is there a library that facilitates the creation of such commands?
The baker is pretty nice, I think. Optfunc , perhaps as well.
Optparse is the way to go
Do you just want to create a two-level team? You should use argparse - it is quite simple, similar to optparse, but it simplifies the task of a two-level command and there will be a standard library with Python 2.7.
Take a look at the plac . I have not used it since I came across it recently. It looks simple enough.
Source: https://habr.com/ru/post/1312174/More articles:main problem when implementing checks through properties? Please help me - c #How to synchronize two (or n) replication processes for SQL Server databases? - synchronizationOne website with multiple connection strings using asp mvc 2 and nhibernate - nhibernateMySQL: update table column from subquery result - mysqlConfirmation before closing - c #Does a DOM object (in Javascript) remove a memory leak if it is associated with an event? - javascriptMath annotations in PDF file - annotationsWhy are my aspx pages not cached on the client? - httpHow to insert a source PDF file into an existing PDF page? - pdfHow to explain CSS Float in a common language? - cssAll Articles