Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10463
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!prichard.zen.co.uk.POSTED!not-for-mail |
|---|---|
| From | Nobody <nobody@nowhere.com> |
| Subject | Re: shlex parsing |
| Date | Thu, 28 Jul 2011 17:37:36 +0100 |
| User-Agent | Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) |
| Message-Id | <pan.2011.07.28.16.37.35.287000@nowhere.com> |
| Newsgroups | comp.lang.python |
| References | <mailman.1538.1311795072.1164.python-list@python.org> <4e3184d3$0$29530$426a74cc@news.free.fr> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 12 |
| Organization | Zen Internet |
| NNTP-Posting-Host | 85f64d92.news.zen.co.uk |
| X-Trace | DXC=nF?VcPS[7VKSRhWa=_nPTM0g@SS;SF6nGR9OH0:RnEND<2;RXiaHNbL^4:f3[2`5ENaYUc2IdYV4M |
| X-Complaints-To | abuse@zen.co.uk |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:10463 |
Show key headers only | View raw
On Thu, 28 Jul 2011 17:48:34 +0200, Web Dreamer wrote:
>> I would like to parse this TCL command line with shlex:
>>
>> '-option1 [get_rule A1 B2] -option2 $VAR -option3 TAG'
>>>> s = s.replace('[','"[')
>>>> s = s.replace(']',']"')
Note that this approach won't work if you have nested brackets or braces.
That would require a real parser.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
shlex parsing Karim <karim.liateni@free.fr> - 2011-07-27 21:30 +0200
Re: shlex parsing Web Dreamer <webdreamer@nospam.fr> - 2011-07-28 17:48 +0200
Re: shlex parsing Karim <karim.liateni@free.fr> - 2011-07-28 18:21 +0200
Re: shlex parsing Nobody <nobody@nowhere.com> - 2011-07-28 17:37 +0100
Re: shlex parsing Karim <karim.liateni@free.fr> - 2011-07-28 19:51 +0200
Re: shlex parsing Web Dreamer <webdreamer@nospam.fr> - 2011-07-29 09:30 +0200
Re: shlex parsing Web Dreamer <webdreamer@nospam.fr> - 2011-07-29 09:24 +0200
Re: shlex parsing Karim <karim.liateni@free.fr> - 2011-07-29 11:37 +0200
Re: shlex parsing Web Dreamer <webdreamer@nospam.fr> - 2011-07-29 15:42 +0200
Re: shlex parsing Karim <karim.liateni@free.fr> - 2011-07-29 16:34 +0200
csiph-web