summaryrefslogtreecommitdiffstats
path: root/Tools/freeze/checkextensions.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2002-09-11 20:36:02 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2002-09-11 20:36:02 (GMT)
commitaaab30e00cc3e8d90c71b8657c284feeb4ac1413 (patch)
treed055e0bd374770014d9afdff1b961418b1828584 /Tools/freeze/checkextensions.py
parent6a0477b099560a452e37fe77c3850bf232487c16 (diff)
downloadcpython-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.py')
-rw-r--r--Tools/freeze/checkextensions.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Tools/freeze/checkextensions.py b/Tools/freeze/checkextensions.py
index 8d597bf..584f8a6 100644
--- a/Tools/freeze/checkextensions.py
+++ b/Tools/freeze/checkextensions.py
@@ -3,7 +3,6 @@
# and one or more .o files or a lib.a file.
import os
-import string
import parsesetup
def checkextensions(unknown, extensions):
@@ -44,7 +43,7 @@ def select(e, mods, vars, mod, skipofiles):
if not w:
continue
w = expandvars(w, vars)
- for w in string.split(w):
+ for w in w.split():
if skipofiles and w[-2:] == '.o':
continue
# Assume $var expands to absolute pathname
@@ -73,14 +72,14 @@ def treatword(w):
def expandvars(str, vars):
i = 0
while i < len(str):
- i = k = string.find(str, '$', i)
+ i = k = str.find('$', i)
if i < 0:
break
i = i+1
var = str[i:i+1]
i = i+1
if var == '(':
- j = string.find(str, ')', i)
+ j = str.find(')', i)
if j < 0:
break
var = str[i:j]