optparse eats $

tazz_ben ben at wbpsystems.com
Tue Apr 19 16:28:57 EDT 2011


So, I'm using optparse as follows:

Command line:
python expense.py ">$100" -f ~/desktop/test.txt
['>00']


In Main:

desc = ''
p = optparse.OptionParser(description=desc)
	
utilities = optparse.OptionGroup(p, 'Utility Options')
utilities.add_option('--file', '-f', dest="file", help="Define the active file to analyze", default='', metavar='"<File Path>"')

(options, arguments) = p.parse_args()

print arguments  <- What is becoming ['>00']


So, any ideas?  Why is including a $ eating both the dollar signa and the 1?



More information about the Python-list mailing list