I want to parse some simple arguments from the command line. This shows all of the arguments:
#!/usr/bin/python
import sys
#print all of the arguments
for arg in sys.argv:
print arg
but I want to handle something like
--file a.txt
or
--x 12 --y 13 --z 14
I saw some libraries like optparse, but is there not something built in to do this simple type of parsing?
Thanks,
Dave