A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/065042.html below:

[Python-Dev] New string method - splitquoted

[Python-Dev] New string method - splitquotedGiovanni Bajo rasky at develer.com
Thu May 18 10:21:07 CEST 2006
Heiko Wundram <me+python-dev at modelnine.org> wrote:

> Don't get me wrong, I personally find this functionality very, very
> interesting (I'm +0.5 on adding it in some way or another),
> especially as a
> part of the standard library (not necessarily as an extension to
> .split()).


It's already there. It's called shlex.split(), and follows the semantic of a
standard UNIX shell, including escaping and other things.

>>> import shlex
>>> shlex.split(r"""Hey I\'m a "bad guy" for you""")
['Hey', "I'm", 'a', 'bad guy', 'for', 'you']

Giovanni Bajo

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4