If you need to make a very simple command-line interface and it doesn't need to be friendly, you can read sys.argv to manually process the arguments coming into your program.
Read an article version of this video at https://pym.dev/parsing-command-line-...
Find more Python screencasts at https://pym.dev/screencasts/
00:00 Parsing command-line arguments
00:20 Why not use sys.argv to get command-line arguments?
01:03 Comparing argparse to manually reading sys.argv
01:45 Accepting optional command-line arguments
02:50 Optional command-line arguments without a value
03:22 Adding documentation for command-line interface using argparse
03:55 Use argparse for making friendly command-line interfaces
Auf dieser Seite können Sie das Online-Video argparse: parse command-line arguments in Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Python Morsels 17 April 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 527 Mal angesehen und es wurde von 18 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!