Accessing command line arguments in Python

Pubblicato il: 10 aprile 2023
sul canale di: Python Morsels
345
15

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/accessing-command-lin...

Find more Python screencasts at https://pym.dev/screencasts/

00:00 Passing command-line arguments
00:18 Function arguments vs command-line arguments
00:32 Python accepts whatever command-line arguments we give it
00:55 Where are command-line arguments stored?
01:28 Accessing command-line arguments
02:05 Python provides all command-line arguments as strings
02:57 Command-line arguments are stored in the sys.argv list


In questa pagina del sito puoi guardare il video online Accessing command line arguments in Python della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Python Morsels 10 aprile 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 345 volte e gli è piaciuto 15 spettatori. Buona visione!