Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python cli parameter

$ python test.py arg1 arg2 arg3

#!/usr/bin/python

import sys

print 'Number of arguments:', len(sys.argv), 'arguments.'
print 'Argument List:', str(sys.argv)
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #python #cli #parameter
ADD COMMENT
Topic
Name
6+6 =