Home | History | Annotate | Download | only in distutils

Lines Matching defs:string

9 import sys, os, string, re
17 """Return a string that identifies the current platform. This is used
43 i = string.find(sys.version, prefix)
46 j = string.find(sys.version, ")", i)
69 osname = string.lower(osname)
70 osname = string.replace(osname, '/', '')
71 machine = string.replace(machine, ' ', '_')
72 machine = string.replace(machine, '/', '-')
128 paths = string.split(pathname, '/')
198 """Perform shell/Perl-style variable substitution on 'string'. Every
227 such as 'rename()' or 'link()'. Returns the error message as a string
248 _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
253 """Split a string up according to Unix shell-like rules for quotes and
255 spaces are not escaped by a backslash, or inside a quoted string.
259 characters are stripped from any quoted string. Returns a list of
263 # This is a nice algorithm for splitting up a single string, since it
268 s = string.strip(s)
279 if s[end] in string.whitespace: # unescaped, unquoted whitespace: now
281 s = string.lstrip(s[end:])
290 if s[end] == "'": # slurp singly-quoted string
292 elif s[end] == '"': # slurp doubly-quoted string
300 "bad string (mismatched %s quotes?)" % s[end]
335 """Convert a string representation of truth to true (1) or false (0).
341 val = string.lower(val)
367 'basedir'. 'prefix' is a string that will be stripped off of each
429 # as a dumb string, so trailing slashes and so forth matter.
435 script.write(string.join(map(repr, py_files), ",\n") + "]\n")
494 """Return a version of the string escaped for inclusion in an
497 lines = string.split(header, '\n')
498 header = string.join(lines, '\n' + 8*' ')