[Python-checkins] CVS: distutils/distutils util.py,1.42,1.43
Greg Ward
python-dev@python.org
Tue, 8 Aug 2000 07:38:17 -0700
Update of /cvsroot/python/distutils/distutils
In directory slayer.i.sourceforge.net:/tmp/cvs-serv8087
Modified Files:
util.py
Log Message:
Fix so 'split_quoted()' handles any whitespace delimiter (not just space).
Index: util.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/util.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** util.py 2000/08/05 01:25:24 1.42
--- util.py 2000/08/08 14:38:13 1.43
***************
*** 140,144 ****
# Needed by 'split_quoted()'
! _wordchars_re = re.compile(r'[^\\\'\"\ ]*')
_squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
_dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')
--- 140,144 ----
# Needed by 'split_quoted()'
! _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
_squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
_dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')
***************
*** 170,174 ****
break
! if s[end] == ' ': # unescaped, unquoted space: now
words.append(s[:end]) # we definitely have a word delimiter
s = string.lstrip(s[end:])
--- 170,174 ----
break
! if s[end] in string.whitespace: # unescaped, unquoted whitespace: now
words.append(s[:end]) # we definitely have a word delimiter
s = string.lstrip(s[end:])