command line arguments in exceptions handling in python code example
Example: python sys.argv exception
try:
filename = sys.argv[1]
except IndexError:
print "You did not specify a file"
sys.exit(1)
try:
filename = sys.argv[1]
except IndexError:
print "You did not specify a file"
sys.exit(1)