mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
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:
parent
6a0477b099
commit
aaab30e00c
70 changed files with 271 additions and 346 deletions
|
@ -22,7 +22,6 @@ import os
|
|||
import sys
|
||||
import time
|
||||
import getopt
|
||||
import string
|
||||
import ftplib
|
||||
import netrc
|
||||
from fnmatch import fnmatch
|
||||
|
@ -127,7 +126,7 @@ def mirrorsubdir(f, localdir):
|
|||
if mac:
|
||||
# Mac listing has just filenames;
|
||||
# trailing / means subdirectory
|
||||
filename = string.strip(line)
|
||||
filename = line.strip()
|
||||
mode = '-'
|
||||
if filename[-1:] == '/':
|
||||
filename = filename[:-1]
|
||||
|
@ -135,12 +134,12 @@ def mirrorsubdir(f, localdir):
|
|||
infostuff = ''
|
||||
else:
|
||||
# Parse, assuming a UNIX listing
|
||||
words = string.split(line, None, 8)
|
||||
words = line.split(None, 8)
|
||||
if len(words) < 6:
|
||||
if verbose > 1: print 'Skipping short line'
|
||||
continue
|
||||
filename = string.lstrip(words[-1])
|
||||
i = string.find(filename, " -> ")
|
||||
filename = words[-1].lstrip()
|
||||
i = filename.find(" -> ")
|
||||
if i >= 0:
|
||||
# words[0] had better start with 'l'...
|
||||
if verbose > 1:
|
||||
|
@ -360,7 +359,7 @@ class LoggingFile:
|
|||
def askabout(filetype, filename, pwd):
|
||||
prompt = 'Retrieve %s %s from %s ? [ny] ' % (filetype, filename, pwd)
|
||||
while 1:
|
||||
reply = string.lower(string.strip(raw_input(prompt)))
|
||||
reply = raw_input(prompt).strip().lower()
|
||||
if reply in ['y', 'ye', 'yes']:
|
||||
return 1
|
||||
if reply in ['', 'n', 'no', 'nop', 'nope']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue