argparse: parse command-line arguments in Python

Publicado el: 17 abril 2023
en el canal de: Python Morsels
527
18

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


En esta página del sitio puede ver el video en línea argparse: parse command-line arguments in Python de Duración hora minuto segunda en buena calidad , que subió el usuario Python Morsels 17 abril 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 527 veces y le gustó 18 a los espectadores. Disfruta viendo!