shlex.split() now has an optional "posix" parameter.

This commit is contained in:
Georg Brandl 2007-05-24 16:49:29 +00:00
parent df25efeae9
commit c90bc75994
3 changed files with 8 additions and 4 deletions

View file

@ -271,8 +271,8 @@ class shlex:
raise StopIteration
return token
def split(s, comments=False):
lex = shlex(s, posix=True)
def split(s, comments=False, posix=True):
lex = shlex(s, posix)
lex.whitespace_split = True
if not comments:
lex.commenters = ''