diff options
author | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 (GMT) |
commit | aaab30e00cc3e8d90c71b8657c284feeb4ac1413 (patch) | |
tree | d055e0bd374770014d9afdff1b961418b1828584 /Tools/freeze/checkextensions_win32.py | |
parent | 6a0477b099560a452e37fe77c3850bf232487c16 (diff) | |
download | cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.zip cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.gz cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.bz2 |
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)
This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
Diffstat (limited to 'Tools/freeze/checkextensions_win32.py')
-rw-r--r-- | Tools/freeze/checkextensions_win32.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/freeze/checkextensions_win32.py b/Tools/freeze/checkextensions_win32.py index 85c3a3c..669a142 100644 --- a/Tools/freeze/checkextensions_win32.py +++ b/Tools/freeze/checkextensions_win32.py @@ -22,7 +22,7 @@ At the moment the name and location of this INI file is hardcoded, but an obvious enhancement would be to provide command line options. """ -import os, string, sys +import os, sys try: import win32api except ImportError: @@ -107,12 +107,12 @@ def get_extension_defn(moduleName, mapFileName, prefix): module.AddCompilerOption(win32api.ExpandEnvironmentStrings(cl_options)) exclude = win32api.GetProfileVal(moduleName, "exclude", "", mapFileName) - exclude = string.split(exclude) + exclude = exclude.split() if win32api.GetProfileVal(moduleName, "Unicode", 0, mapFileName): module.AddCompilerOption('/D UNICODE /D _UNICODE') - libs = string.split(win32api.GetProfileVal(moduleName, "libs", "", mapFileName)) + libs = win32api.GetProfileVal(moduleName, "libs", "", mapFileName).split() for lib in libs: module.AddLinkerLib(win32api.ExpandEnvironmentStrings(lib)) @@ -135,9 +135,9 @@ def parse_dsp(dsp): sys.stderr.write("%s: %s\n" % (dsp, msg)) return None for line in lines: - fields = string.split(string.strip(line), "=", 2) + fields = line.strip().split("=", 2) if fields[0]=="SOURCE": - if string.lower(os.path.splitext(fields[1])[1]) in ['.cpp', '.c']: + if os.path.splitext(fields[1])[1].lower() in ['.cpp', '.c']: ret.append( win32api.GetFullPathName(os.path.join(dsp_path, fields[1] ) ) ) return ret @@ -148,12 +148,12 @@ def write_extension_table(fname, modules): # Write fn protos for module in modules: # bit of a hack for .pyd's as part of packages. - name = string.split(module.name,'.')[-1] + name = module.name.split('.')[-1] fp.write('extern void init%s(void);\n' % (name) ) # Write the table fp.write (ext_tab_header) for module in modules: - name = string.split(module.name,'.')[-1] + name = module.name.split('.')[-1] fp.write('\t{"%s", init%s},\n' % (name, name) ) fp.write (ext_tab_footer) |