Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python system arguments

import sys

print 'Number of arguments:', len(sys.argv), 'arguments.'
print 'Argument List:', str(sys.argv)

########### command: python test.py arg1 arg2 arg3 ############
Number of arguments: 4 arguments.
Argument List: ['test.py', 'arg1', 'arg2', 'arg3']
 
PREVIOUS NEXT
Tagged: #python #system #arguments
ADD COMMENT
Topic
Name
6+1 =