Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3587

optparse eats $

From tazz_ben <ben@wbpsystems.com>
Newsgroups comp.lang.python
Subject optparse eats $
Date 2011-04-19 13:28 -0700
Organization http://groups.google.com
Message-ID <f315a5f9-b11a-48e8-b5ce-1e72dcabc161@glegroupsg2000goo.googlegroups.com> (permalink)

Show all headers | View raw


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?

Back to comp.lang.python | Previous | NextNext in thread | Find similar


Thread

optparse eats $ tazz_ben <ben@wbpsystems.com> - 2011-04-19 13:28 -0700
  Re: optparse eats $ John Gordon <gordon@panix.com> - 2011-04-19 20:34 +0000
  Re: optparse eats $ Peter Otten <__peter__@web.de> - 2011-04-19 22:36 +0200

csiph-web