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.
This commit is contained in:
Walter Dörwald 2002-09-11 20:36:02 +00:00
parent 6a0477b099
commit aaab30e00c
70 changed files with 271 additions and 346 deletions

View file

@ -24,7 +24,7 @@ from their output.
"""
import os, sys, getopt, string, re
import os, sys, getopt, re
sep1 = '='*77 + '\n' # file separator
sep2 = '-'*28 + '\n' # revision separator
@ -84,7 +84,7 @@ def digest_chunk(chunk):
keylen = len(key)
for line in lines:
if line[:keylen] == key:
working_file = string.strip(line[keylen:])
working_file = line[keylen:].strip()
break
else:
working_file = None
@ -93,7 +93,7 @@ def digest_chunk(chunk):
revline = lines[0]
dateline = lines[1]
text = lines[2:]
words = string.split(dateline)
words = dateline.split()
author = None
if len(words) >= 3 and words[0] == 'date:':
dateword = words[1]
@ -108,7 +108,7 @@ def digest_chunk(chunk):
else:
date = None
text.insert(0, revline)
words = string.split(revline)
words = revline.split()
if len(words) >= 2 and words[0] == 'revision':
rev = words[1]
else: