import sys
print("\n".join(sys.argv))
sys.argv
is a list that contains all the arguments passed to the script on the command line. sys.argv[0]
is the script name.
Basically,
import sys
print(sys.argv[1:])
More Related Contents:
- How to read/process command line arguments?
- How do I access 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 to prompt for user input and read command-line arguments [closed]
- 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]
- Cannot redirect output when I run Python script on Windows using just script’s name
- Passing command line arguments to argv in jupyter/ipython notebook
- Value error trying to install Python for Windows extensions
- Passing IPython variables as arguments to bash commands
- Python, installing clarifai –> VS14.0 link.exe failed with exit status 1158
- ‘yes’ reporting error with subprocess communicate()
- 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
- Read Unicode characters from command-line arguments in Python 2.x on Windows
- Command-line input causes SyntaxError
- Launch Pycharm from command line (terminal)
- Read from File, or STDIN
- How to add to and remove from system’s environment variable “PATH”?
- How to find which version of TensorFlow is installed in my system?
- Python argparse command line flags without arguments