Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3589
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Peter Otten <__peter__@web.de> |
| Newsgroups | comp.lang.python |
| Subject | Re: optparse eats $ |
| Followup-To | comp.lang.python |
| Date | Tue, 19 Apr 2011 22:36:58 +0200 |
| Organization | None |
| Lines | 34 |
| Message-ID | <iokrp4$7k4$1@solani.org> (permalink) |
| References | <f315a5f9-b11a-48e8-b5ce-1e72dcabc161@glegroupsg2000goo.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| X-Trace | solani.org 1303245413 7812 eJwFwYEBwCAIA7CXmLOVnSOF/n/CErx8qLMJbhiOYWBGB12VtyouJctTZn7TKJu9ljCp1T9L4hMV (19 Apr 2011 20:36:53 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Tue, 19 Apr 2011 20:36:53 +0000 (UTC) |
| X-User-ID | eJwNwokRwDAIA7CVwmMbxknSsv8I7UkIGq+SYGJ+dM4Dq051XrcoaWMcNWk6Zyg7SNnWkS/H2z2+otCK4Acc1ROn |
| Cancel-Lock | sha1:1GK1G3OnftSrjMfe0KuAo9fJoKQ= |
| X-NNTP-Posting-Host | eJwFwYEBwCAIA7CXmJY6zrGM/n/Cktx82AdMIp22aumC0yHz0NMDfIP5MmC132n4RvnF7lJEnaK1V3QuXq1KIdSq6uQPItkbIA== |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:3589 |
Followups directed to: comp.lang.python
Show key headers only | View raw
tazz_ben wrote:
> 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?
It ain't optparse, it's your shell:
$ echo ">$100"
>00
$ echo '>$100'
>$100
$
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll 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