[issue7611] shlex not posix compliant when parsing "foo#bar"

Jan David Mol report at bugs.python.org
Thu Dec 31 10:10:36 CET 2009


Jan David Mol <jjdmol at gmail.com> added the comment:

Attached a program which shows the relevant behaviour:

import shlex

tests = [ "foo#bar", "foo #bar" ]

for t in tests:
  print "%s -> %s" % (t,[x for x in shlex.shlex(t,posix=True)])

results in

$ python lexer_test.py
foo#bar -> ['foo']
foo #bar -> ['foo']

(expected of course is ['foo#bar'] on the first line).

----------
versions: +Python 2.5
Added file: http://bugs.python.org/file15709/lexer_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7611>
_______________________________________


More information about the Python-bugs-list mailing list