Lines Matching defs:string
10 import string
20 """Return a string that identifies the current platform. This is used mainly to
189 """Perform shell/Perl-style variable substitution on 'string'. Every
224 _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
229 """Split a string up according to Unix shell-like rules for quotes and
231 spaces are not escaped by a backslash, or inside a quoted string.
235 characters are stripped from any quoted string. Returns a list of
239 # This is a nice algorithm for splitting up a single string, since it
255 if s[end] in string.whitespace: # unescaped, unquoted whitespace: now
266 if s[end] == "'": # slurp singly-quoted string
268 elif s[end] == '"': # slurp doubly-quoted string
274 raise ValueError("bad string (mismatched %s quotes?)" % s[end])
309 """Convert a string representation of truth to true (1) or false (0).
341 'basedir'. 'prefix' is a string that will be stripped off of each
409 # as a dumb string, so trailing slashes and so forth matter.
476 """Return a version of the string escaped for inclusion in an
517 If you give a template string, it's parsed like a MANIFEST.in.