Passing Arguments
eharetea

Methods for handling argument passing.

Pass arguments into Python.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Friday August 01st, 2008 02:06 AM

/* these two import methods both work */

from sys import argv
#from sys import *       
print argv[0] # this would be the name of the file
print argv[1] # this would be the first argument


import sys
print sys.argv[0] # this would be the name of the file
print sys.argv[1] # this would be the first argument