Fix so 'split_quoted()' handles any whitespace delimiter (not just space).
authorGreg Ward <gward@python.net>
Tue, 8 Aug 2000 14:38:13 +0000 (14:38 +0000)
committerGreg Ward <gward@python.net>
Tue, 8 Aug 2000 14:38:13 +0000 (14:38 +0000)
Lib/distutils/util.py

index 96266d266e6f37d03591f9430503f607db92e2fb..2487f6dab6363443e00f4ede2e375619106995fb 100644 (file)
@@ -139,7 +139,7 @@ def grok_environment_error (exc, prefix="error: "):
 
 
 # Needed by 'split_quoted()'
-_wordchars_re = re.compile(r'[^\\\'\"\ ]*')
+_wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
 _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
 _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')
 
@@ -169,7 +169,7 @@ def split_quoted (s):
             words.append(s[:end])
             break
 
-        if s[end] == ' ':               # unescaped, unquoted space: now
+        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:])
             pos = 0