Answers for "import python file with arguments"

8

python read arguments

#!/usr/bin/python

import sys

print('Number of arguments:', len(sys.argv), 'arguments.')
print('Argument List:', str(sys.argv))
Posted by: Guest on March-01-2020
9

python arguments

import sys

print ("the script has the name %s" % (sys.argv[0])
Posted by: Guest on November-18-2019

Code answers related to "import python file with arguments"

Python Answers by Framework

Browse Popular Code Answers by Language