Ich arbeite zur Zeit an einem sehr umfangreichen Skript, welches viele Funktionen bietet. Die Funktionen kann man mit sub-commands bestimmen.
Beispiel:
Code: Alles auswählen
$> myscript.py download file.xml
$> myscript.py upload file.xml
$> myscript.py list short
Beispiel:
Code: Alles auswählen
$> myscript.py --help
...
optional arguments:
-h, --help show this help message and exit
sub-commands:
{ download, upload, list }
Ungefähr so:
Code: Alles auswählen
$> myscript.py --help
...
optional arguments:
-h, --help show this help message and exit
sub-commands:
download description of download
upload description of upload
list description of list
Danke schonmal im voraus.
Gruß Neonfly