import sys
print(sys.argv)
More specifically, if you run python example.py one two three
:
>>> import sys
>>> print(sys.argv)
['example.py', 'one', 'two', 'three']
More Related Contents:
- How to read/process command line arguments?
- What’s the best way to parse command line arguments? [closed]
- Passing a List to Python From Command Line
- How can I process command line arguments in Python? [duplicate]
- How can I read and process (parse) command line arguments?
- How to prompt for user input and read command-line arguments [closed]
- How to execute Python scripts in Windows?
- Windows is not passing command line arguments to Python programs executed from the shell
- How to pass arguments in pytest by command line
- syntax error when using command line in python
- “list index out of range” when using sys.argv[1]
- How can I hide the console window in a PyQt app running on Windows?
- How can I overwrite/print over the current line in Windows command line?
- Executing command line programs from within python [duplicate]
- How do I make a python script executable?
- Cannot redirect output when I run Python script on Windows using just script’s name
- Value error trying to install Python for Windows extensions
- Python, installing clarifai –> VS14.0 link.exe failed with exit status 1158
- How to make a python, command-line program autocomplete arbitrary things NOT interpreter
- How to parse multiple nested sub-commands using python argparse?
- How to pass dictionary as command line argument to Python script?
- Python Script does not take sys.argv in Windows
- Full command line as it was typed
- How to plot a chart in the terminal
- Command-line input causes SyntaxError
- User input and command line arguments [closed]
- Read from File, or STDIN
- Python argparse command line flags without arguments
- subprocess call ffmpeg (command line)
- Command line execution in different folder