Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3590
| From | Michael Kent <mrmakent@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: optparse eats $ |
| Date | 2011-04-19 13:39 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <9c1c8cb2-b370-4bbd-b49d-515ad209407c@glegroupsg2000goo.googlegroups.com> (permalink) |
Try this on your *nix command line: echo ">$100" On a *nix command line, the '$1' part of ">$100" will be seen as 'give me the value of the shell variable "1"', and since it has no value, will result in an empty string. So it's not optparse, or Python, because the literal string you intend to pass as a command line argument to your Python script never has a chance of getting there. Try escaping the '$' with a backslash on the command line.
Back to comp.lang.python | Previous | Next | Find similar
Re: optparse eats $ Michael Kent <mrmakent@gmail.com> - 2011-04-19 13:39 -0700
csiph-web