Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get command line variables python

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']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #command #line #variables #python
ADD COMMENT
Topic
Name
4+7 =