[Python-3000-checkins] r63375 - in python/branches/py3k/Tools/scripts: checkpyc.py copytime.py findnocoding.py fixcid.py fixdiv.py fixheader.py ftpmirror.py h2py.py mailerdaemon.py nm2def.py objgraph.py parseentities.py pdeps.py pickle2db.py pindent.py suff.py texi2html.py treesync.py xxci.py

georg.brandl python-3000-checkins at python.org
Fri May 16 17:23:31 CEST 2008


Author: georg.brandl
Date: Fri May 16 17:23:30 2008
New Revision: 63375

Log:
Ran 2to3 over scripts directory.


Modified:
   python/branches/py3k/Tools/scripts/checkpyc.py
   python/branches/py3k/Tools/scripts/copytime.py
   python/branches/py3k/Tools/scripts/findnocoding.py
   python/branches/py3k/Tools/scripts/fixcid.py
   python/branches/py3k/Tools/scripts/fixdiv.py
   python/branches/py3k/Tools/scripts/fixheader.py
   python/branches/py3k/Tools/scripts/ftpmirror.py
   python/branches/py3k/Tools/scripts/h2py.py
   python/branches/py3k/Tools/scripts/mailerdaemon.py
   python/branches/py3k/Tools/scripts/nm2def.py
   python/branches/py3k/Tools/scripts/objgraph.py
   python/branches/py3k/Tools/scripts/parseentities.py
   python/branches/py3k/Tools/scripts/pdeps.py
   python/branches/py3k/Tools/scripts/pickle2db.py
   python/branches/py3k/Tools/scripts/pindent.py
   python/branches/py3k/Tools/scripts/suff.py
   python/branches/py3k/Tools/scripts/texi2html.py
   python/branches/py3k/Tools/scripts/treesync.py
   python/branches/py3k/Tools/scripts/xxci.py

Modified: python/branches/py3k/Tools/scripts/checkpyc.py
==============================================================================
--- python/branches/py3k/Tools/scripts/checkpyc.py	(original)
+++ python/branches/py3k/Tools/scripts/checkpyc.py	Fri May 16 17:23:30 2008
@@ -46,19 +46,19 @@
                 magic_str = f.read(4)
                 mtime_str = f.read(4)
                 f.close()
-                if magic_str <> MAGIC:
+                if magic_str != MAGIC:
                     print('Bad MAGIC word in ".pyc" file', end=' ')
                     print(repr(name_c))
                     continue
                 mtime = get_long(mtime_str)
                 if mtime == 0 or mtime == -1:
                     print('Bad ".pyc" file', repr(name_c))
-                elif mtime <> st[ST_MTIME]:
+                elif mtime != st[ST_MTIME]:
                     print('Out-of-date ".pyc" file', end=' ')
                     print(repr(name_c))
 
 def get_long(s):
-    if len(s) <> 4:
+    if len(s) != 4:
         return -1
     return ord(s[0]) + (ord(s[1])<<8) + (ord(s[2])<<16) + (ord(s[3])<<24)
 

Modified: python/branches/py3k/Tools/scripts/copytime.py
==============================================================================
--- python/branches/py3k/Tools/scripts/copytime.py	(original)
+++ python/branches/py3k/Tools/scripts/copytime.py	Fri May 16 17:23:30 2008
@@ -7,7 +7,7 @@
 from stat import ST_ATIME, ST_MTIME # Really constants 7 and 8
 
 def main():
-    if len(sys.argv) <> 3:
+    if len(sys.argv) != 3:
         sys.stderr.write('usage: copytime source destination\n')
         sys.exit(2)
     file1, file2 = sys.argv[1], sys.argv[2]

Modified: python/branches/py3k/Tools/scripts/findnocoding.py
==============================================================================
--- python/branches/py3k/Tools/scripts/findnocoding.py	(original)
+++ python/branches/py3k/Tools/scripts/findnocoding.py	Fri May 16 17:23:30 2008
@@ -42,7 +42,7 @@
 
 def has_correct_encoding(text, codec):
     try:
-        unicode(text, codec)
+        str(text, codec)
     except UnicodeDecodeError:
         return False
     else:

Modified: python/branches/py3k/Tools/scripts/fixcid.py
==============================================================================
--- python/branches/py3k/Tools/scripts/fixcid.py	(original)
+++ python/branches/py3k/Tools/scripts/fixcid.py	Fri May 16 17:23:30 2008
@@ -240,7 +240,7 @@
             elif found == '*/':
                 Program = OutsideCommentProgram
         n = len(found)
-        if Dict.has_key(found):
+        if found in Dict:
             subst = Dict[found]
             if Program is InsideCommentProgram:
                 if not Docomments:
@@ -304,7 +304,7 @@
         if key[0] == '*':
             key = key[1:]
             NotInComment[key] = value
-        if Dict.has_key(key):
+        if key in Dict:
             err('%s:%r: warning: overriding: %r %r\n' % (substfile, lineno, key, value))
             err('%s:%r: warning: previous: %r\n' % (substfile, lineno, Dict[key]))
         Dict[key] = value

Modified: python/branches/py3k/Tools/scripts/fixdiv.py
==============================================================================
--- python/branches/py3k/Tools/scripts/fixdiv.py	(original)
+++ python/branches/py3k/Tools/scripts/fixdiv.py	Fri May 16 17:23:30 2008
@@ -158,7 +158,7 @@
     warnings = readwarnings(args[0])
     if warnings is None:
         return 1
-    files = warnings.keys()
+    files = list(warnings.keys())
     if not files:
         print("No classic division warnings read from", args[0])
         return

Modified: python/branches/py3k/Tools/scripts/fixheader.py
==============================================================================
--- python/branches/py3k/Tools/scripts/fixheader.py	(original)
+++ python/branches/py3k/Tools/scripts/fixheader.py	Fri May 16 17:23:30 2008
@@ -17,7 +17,7 @@
         return
     data = f.read()
     f.close()
-    if data[:2] <> '/*':
+    if data[:2] != '/*':
         sys.stderr.write('%s does not begin with C comment\n' % filename)
         return
     try:

Modified: python/branches/py3k/Tools/scripts/ftpmirror.py
==============================================================================
--- python/branches/py3k/Tools/scripts/ftpmirror.py	(original)
+++ python/branches/py3k/Tools/scripts/ftpmirror.py	Fri May 16 17:23:30 2008
@@ -169,7 +169,7 @@
             subdirs.append(filename)
             continue
         filesfound.append(filename)
-        if info.has_key(filename) and info[filename] == infostuff:
+        if filename in info and info[filename] == infostuff:
             if verbose > 1:
                 print('Already have this version of',repr(filename))
             continue
@@ -178,7 +178,7 @@
         if interactive:
             doit = askabout('file', filename, pwd)
             if not doit:
-                if not info.has_key(filename):
+                if filename not in info:
                     info[filename] = 'Not retrieved'
                 continue
         try:
@@ -241,7 +241,7 @@
     #
     # Remove files from info that are no longer remote
     deletions = 0
-    for filename in info.keys():
+    for filename in list(info.keys()):
         if filename not in filesfound:
             if verbose:
                 print("Removing obsolete info entry for", end=' ')
@@ -258,7 +258,7 @@
     except os.error:
         names = []
     for name in names:
-        if name[0] == '.' or info.has_key(name) or name in subdirs:
+        if name[0] == '.' or name in info or name in subdirs:
             continue
         skip = 0
         for pat in skippats:

Modified: python/branches/py3k/Tools/scripts/h2py.py
==============================================================================
--- python/branches/py3k/Tools/scripts/h2py.py	(original)
+++ python/branches/py3k/Tools/scripts/h2py.py	Fri May 16 17:23:30 2008
@@ -101,7 +101,7 @@
         m = p_hex.search(body, start)
         if not m: break
         s,e = m.span()
-        val = long(body[slice(*m.span(1))], 16)
+        val = int(body[slice(*m.span(1))], 16)
         if val > sys.maxsize:
             val -= UMAX
             body = body[:s] + "(" + str(val) + ")" + body[e:]
@@ -150,9 +150,9 @@
             regs = match.regs
             a, b = regs[1]
             filename = line[a:b]
-            if importable.has_key(filename):
+            if filename in importable:
                 outfp.write('from %s import *\n' % importable[filename])
-            elif not filedict.has_key(filename):
+            elif filename not in filedict:
                 filedict[filename] = None
                 inclfp = None
                 for dir in searchdirs:

Modified: python/branches/py3k/Tools/scripts/mailerdaemon.py
==============================================================================
--- python/branches/py3k/Tools/scripts/mailerdaemon.py	(original)
+++ python/branches/py3k/Tools/scripts/mailerdaemon.py	Fri May 16 17:23:30 2008
@@ -163,7 +163,7 @@
     nok = nwarn = nbad = 0
 
     # find all numeric file names and sort them
-    files = filter(lambda fn, pat=pat: pat.match(fn) is not None, os.listdir('.'))
+    files = list(filter(lambda fn, pat=pat: pat.match(fn) is not None, os.listdir('.')))
     files.sort(sort_numeric)
 
     for fn in files:
@@ -198,7 +198,7 @@
                 date = '%s %02d' % (calendar.month_abbr[mm], dd)
             except:
                 date = '??????'
-            if not errordict.has_key(e):
+            if e not in errordict:
                 errordict[e] = 1
                 errorfirst[e] = '%s (%s)' % (fn, date)
             else:

Modified: python/branches/py3k/Tools/scripts/nm2def.py
==============================================================================
--- python/branches/py3k/Tools/scripts/nm2def.py	(original)
+++ python/branches/py3k/Tools/scripts/nm2def.py	Fri May 16 17:23:30 2008
@@ -84,7 +84,7 @@
 
 def filter_Python(symbols,specials=SPECIALS):
 
-    for name in symbols.keys():
+    for name in list(symbols.keys()):
         if name[:2] == 'Py' or name[:3] == '_Py':
             pass
         elif name not in specials:

Modified: python/branches/py3k/Tools/scripts/objgraph.py
==============================================================================
--- python/branches/py3k/Tools/scripts/objgraph.py	(original)
+++ python/branches/py3k/Tools/scripts/objgraph.py	Fri May 16 17:23:30 2008
@@ -39,7 +39,7 @@
 # If there is no list for the key yet, it is created.
 #
 def store(dict, key, item):
-    if dict.has_key(key):
+    if key in dict:
         dict[key].append(item)
     else:
         dict[key] = [item]
@@ -86,8 +86,7 @@
 # defined.
 #
 def printcallee():
-    flist = file2undef.keys()
-    flist.sort()
+    flist = sorted(file2undef.keys())
     for filename in flist:
         print(filename + ':')
         elist = file2undef[filename]
@@ -97,7 +96,7 @@
                 tabs = '\t'
             else:
                 tabs = '\t\t'
-            if not def2file.has_key(ext):
+            if ext not in def2file:
                 print('\t' + ext + tabs + ' *undefined')
             else:
                 print('\t' + ext + tabs + flat(def2file[ext]))
@@ -105,19 +104,18 @@
 # Print for each module the names of the other modules that use it.
 #
 def printcaller():
-    files = file2def.keys()
-    files.sort()
+    files = sorted(file2def.keys())
     for filename in files:
         callers = []
         for label in file2def[filename]:
-            if undef2file.has_key(label):
+            if label in undef2file:
                 callers = callers + undef2file[label]
         if callers:
             callers.sort()
             print(filename + ':')
             lastfn = ''
             for fn in callers:
-                if fn <> lastfn:
+                if fn != lastfn:
                     print('\t' + fn)
                 lastfn = fn
         else:
@@ -127,16 +125,14 @@
 #
 def printundef():
     undefs = {}
-    for filename in file2undef.keys():
+    for filename in list(file2undef.keys()):
         for ext in file2undef[filename]:
-            if not def2file.has_key(ext):
+            if ext not in def2file:
                 store(undefs, ext, filename)
-    elist = undefs.keys()
-    elist.sort()
+    elist = sorted(undefs.keys())
     for ext in elist:
         print(ext + ':')
-        flist = undefs[ext]
-        flist.sort()
+        flist = sorted(undefs[ext])
         for filename in flist:
             print('\t' + filename)
 
@@ -145,8 +141,7 @@
 def warndups():
     savestdout = sys.stdout
     sys.stdout = sys.stderr
-    names = def2file.keys()
-    names.sort()
+    names = sorted(def2file.keys())
     for name in names:
         if len(def2file[name]) > 1:
             print('warning:', name, 'multiply defined:', end=' ')

Modified: python/branches/py3k/Tools/scripts/parseentities.py
==============================================================================
--- python/branches/py3k/Tools/scripts/parseentities.py	(original)
+++ python/branches/py3k/Tools/scripts/parseentities.py	Fri May 16 17:23:30 2008
@@ -35,9 +35,8 @@
 def writefile(f,defs):
 
     f.write("entitydefs = {\n")
-    items = defs.items()
-    items.sort()
-    for name,(charcode,comment) in items:
+    items = sorted(defs.items())
+    for name, (charcode,comment) in items:
         if charcode[:2] == '&#':
             code = int(charcode[2:-1])
             if code < 256:

Modified: python/branches/py3k/Tools/scripts/pdeps.py
==============================================================================
--- python/branches/py3k/Tools/scripts/pdeps.py	(original)
+++ python/branches/py3k/Tools/scripts/pdeps.py	Fri May 16 17:23:30 2008
@@ -92,7 +92,7 @@
 # Compute closure (this is in fact totally general)
 #
 def closure(table):
-    modules = table.keys()
+    modules = list(table.keys())
     #
     # Initialize reach with a copy of table
     #
@@ -135,7 +135,7 @@
 # If there is no list for the key yet, it is created.
 #
 def store(dict, key, item):
-    if dict.has_key(key):
+    if key in dict:
         dict[key].append(item)
     else:
         dict[key] = [item]
@@ -144,13 +144,11 @@
 # Tabulate results neatly
 #
 def printresults(table):
-    modules = table.keys()
+    modules = sorted(table.keys())
     maxlen = 0
     for mod in modules: maxlen = max(maxlen, len(mod))
-    modules.sort()
     for mod in modules:
-        list = table[mod]
-        list.sort()
+        list = sorted(table[mod])
         print(mod.ljust(maxlen), ':', end=' ')
         if mod in list:
             print('(*)', end=' ')

Modified: python/branches/py3k/Tools/scripts/pickle2db.py
==============================================================================
--- python/branches/py3k/Tools/scripts/pickle2db.py	(original)
+++ python/branches/py3k/Tools/scripts/pickle2db.py	Fri May 16 17:23:30 2008
@@ -128,7 +128,7 @@
         sys.stderr.write("Check for format or version mismatch.\n")
         return 1
     else:
-        for k in db.keys():
+        for k in list(db.keys()):
             del db[k]
 
     while 1:

Modified: python/branches/py3k/Tools/scripts/pindent.py
==============================================================================
--- python/branches/py3k/Tools/scripts/pindent.py	(original)
+++ python/branches/py3k/Tools/scripts/pindent.py	Fri May 16 17:23:30 2008
@@ -188,7 +188,7 @@
                     stack.append((kw, kw))
                     continue
                 # end if
-                if next.has_key(kw) and stack:
+                if kw in next and stack:
                     self.putline(line, len(stack)-1)
                     kwa, kwb = stack[-1]
                     stack[-1] = kwa, kw
@@ -254,7 +254,7 @@
                 m = self.kwprog.match(line)
                 if m:
                     thiskw = m.group('kw')
-                    if not next.has_key(thiskw):
+                    if thiskw not in next:
                         thiskw = ''
                     # end if
                     if thiskw in ('def', 'class'):

Modified: python/branches/py3k/Tools/scripts/suff.py
==============================================================================
--- python/branches/py3k/Tools/scripts/suff.py	(original)
+++ python/branches/py3k/Tools/scripts/suff.py	Fri May 16 17:23:30 2008
@@ -11,11 +11,10 @@
     suffixes = {}
     for filename in files:
         suff = getsuffix(filename)
-        if not suffixes.has_key(suff):
+        if suff not in suffixes:
             suffixes[suff] = []
         suffixes[suff].append(filename)
-    keys = suffixes.keys()
-    keys.sort()
+    keys = sorted(suffixes.keys())
     for suff in keys:
         print(repr(suff), len(suffixes[suff]))
 

Modified: python/branches/py3k/Tools/scripts/texi2html.py
==============================================================================
--- python/branches/py3k/Tools/scripts/texi2html.py	(original)
+++ python/branches/py3k/Tools/scripts/texi2html.py	Fri May 16 17:23:30 2008
@@ -114,7 +114,8 @@
         self.lines = []
 
     def write(self, *lines):
-        map(self.lines.append, lines)
+        for line in lines:
+            self.lines.append(line)
 
     def flush(self):
         fp = open(self.dirname + '/' + makefile(self.name), 'w')
@@ -173,7 +174,7 @@
         self.link('  Next', self.next, rel='Next')
         self.link('  Prev', self.prev, rel='Previous')
         self.link('  Up', self.up, rel='Up')
-        if self.name <> self.topname:
+        if self.name != self.topname:
             self.link('  Top', self.topname)
 
 
@@ -256,7 +257,7 @@
         while line and (line[0] == '%' or blprog.match(line)):
             line = fp.readline()
             lineno = lineno + 1
-        if line[:len(MAGIC)] <> MAGIC:
+        if line[:len(MAGIC)] != MAGIC:
             raise SyntaxError('file does not begin with %r' % (MAGIC,))
         self.parserest(fp, lineno)
 
@@ -318,7 +319,7 @@
 
     # Start saving text in a buffer instead of writing it to a file
     def startsaving(self):
-        if self.savetext <> None:
+        if self.savetext != None:
             self.savestack.append(self.savetext)
             # print '*** Recursively saving text, expect trouble'
         self.savetext = ''
@@ -340,7 +341,7 @@
         except:
             print(args)
             raise TypeError
-        if self.savetext <> None:
+        if self.savetext != None:
             self.savetext = self.savetext + text
         elif self.nodefp:
             self.nodefp.write(text)
@@ -349,7 +350,7 @@
 
     # Complete the current node -- write footnotes and close file
     def endnode(self):
-        if self.savetext <> None:
+        if self.savetext != None:
             print('*** Still saving text at end of node')
             dummy = self.collectsavings()
         if self.footnotes:
@@ -361,7 +362,7 @@
                 self.link('Next', next)
                 self.link('Prev', prev)
                 self.link('Up', up)
-                if self.nodename <> self.topname:
+                if self.nodename != self.topname:
                     self.link('Top', self.topname)
                 self.write('<HR>\n')
             self.write('</BODY>\n')
@@ -473,7 +474,7 @@
                     continue
                 method()
                 continue
-            if c <> '@':
+            if c != '@':
                 # Cannot happen unless spprog is changed
                 raise RuntimeError('unexpected funny %r' % c)
             start = i
@@ -517,7 +518,7 @@
         print('*** No open func for @' + cmd + '{...}')
         cmd = cmd + '{'
         self.write('@', cmd)
-        if not self.unknown.has_key(cmd):
+        if cmd not in self.unknown:
             self.unknown[cmd] = 1
         else:
             self.unknown[cmd] = self.unknown[cmd] + 1
@@ -526,7 +527,7 @@
         print('*** No close func for @' + cmd + '{...}')
         cmd = '}' + cmd
         self.write('}')
-        if not self.unknown.has_key(cmd):
+        if cmd not in self.unknown:
             self.unknown[cmd] = 1
         else:
             self.unknown[cmd] = self.unknown[cmd] + 1
@@ -534,7 +535,7 @@
     def unknown_handle(self, cmd):
         print('*** No handler for @' + cmd)
         self.write('@', cmd)
-        if not self.unknown.has_key(cmd):
+        if cmd not in self.unknown:
             self.unknown[cmd] = 1
         else:
             self.unknown[cmd] = self.unknown[cmd] + 1
@@ -891,7 +892,7 @@
 
     def unknown_cmd(self, cmd, args):
         print('*** unknown', '@' + cmd, args)
-        if not self.unknown.has_key(cmd):
+        if cmd not in self.unknown:
             self.unknown[cmd] = 1
         else:
             self.unknown[cmd] = self.unknown[cmd] + 1
@@ -902,7 +903,7 @@
             print('*** @end w/o args')
         else:
             cmd = words[0]
-            if not self.stack or self.stack[-1] <> cmd:
+            if not self.stack or self.stack[-1] != cmd:
                 print('*** @end', cmd, 'unexpected')
             else:
                 del self.stack[-1]
@@ -916,7 +917,7 @@
     def unknown_end(self, cmd):
         cmd = 'end ' + cmd
         print('*** unknown', '@' + cmd)
-        if not self.unknown.has_key(cmd):
+        if cmd not in self.unknown:
             self.unknown[cmd] = 1
         else:
             self.unknown[cmd] = self.unknown[cmd] + 1
@@ -953,8 +954,7 @@
         self.values[args] = None
 
     def bgn_ifset(self, args):
-        if args not in self.values.keys() \
-           or self.values[args] is None:
+        if args not in self.values or self.values[args] is None:
             self.skip = self.skip + 1
             self.stackinfo[len(self.stack)] = 1
         else:
@@ -968,8 +968,7 @@
             print('*** end_ifset: KeyError :', len(self.stack) + 1)
 
     def bgn_ifclear(self, args):
-        if args in self.values.keys() \
-           and self.values[args] is not None:
+        if args in self.values and self.values[args] is not None:
             self.skip = self.skip + 1
             self.stackinfo[len(self.stack)] = 1
         else:
@@ -987,7 +986,7 @@
 
     def close_value(self):
         key = self.collectsavings()
-        if key in self.values.keys():
+        if key in self.values:
             self.write(self.values[key])
         else:
             print('*** Undefined value: ', key)
@@ -1051,7 +1050,7 @@
         self.nodelinks = parts
         [name, next, prev, up] = parts[:4]
         file = self.dirname + '/' + makefile(name)
-        if self.filenames.has_key(file):
+        if file in self.filenames:
             print('*** Filename already in use: ', file)
         else:
             if self.debugging: print('!'*self.debugging, '--- writing', file)
@@ -1443,7 +1442,7 @@
             else:
                 # some other character, e.g. '-'
                 args = self.itemarg + ' ' + args
-        if self.itemnumber <> None:
+        if self.itemnumber != None:
             args = self.itemnumber + '. ' + args
             self.itemnumber = increment(self.itemnumber)
         if self.stack and self.stack[-1] == 'table':
@@ -1542,11 +1541,11 @@
         self.indextitle['vr'] = 'Variable'
         #
         self.whichindex = {}
-        for name in self.indextitle.keys():
+        for name in self.indextitle:
             self.whichindex[name] = []
 
     def user_index(self, name, args):
-        if self.whichindex.has_key(name):
+        if name in self.whichindex:
             self.index(name, args)
         else:
             print('*** No index named', repr(name))
@@ -1564,15 +1563,15 @@
 
     def do_synindex(self, args):
         words = args.split()
-        if len(words) <> 2:
+        if len(words) != 2:
             print('*** bad @synindex', args)
             return
         [old, new] = words
-        if not self.whichindex.has_key(old) or \
-                  not self.whichindex.has_key(new):
+        if old not in self.whichindex or \
+                  new not in self.whichindex:
             print('*** bad key(s) in @synindex', args)
             return
-        if old <> new and \
+        if old != new and \
                   self.whichindex[old] is not self.whichindex[new]:
             inew = self.whichindex[new]
             inew[len(inew):] = self.whichindex[old]
@@ -1582,7 +1581,7 @@
     def do_printindex(self, args):
         words = args.split()
         for name in words:
-            if self.whichindex.has_key(name):
+            if name in self.whichindex:
                 self.prindex(name)
             else:
                 print('*** No index named', repr(name))
@@ -1630,8 +1629,7 @@
     def report(self):
         if self.unknown:
             print('--- Unrecognized commands ---')
-            cmds = self.unknown.keys()
-            cmds.sort()
+            cmds = sorted(self.unknown.keys())
             for cmd in cmds:
                 print(cmd.ljust(20), self.unknown[cmd])
 
@@ -1849,8 +1847,7 @@
             sys.exit(1)
 
     def dumpfiles(self, outfile=sys.stdout):
-        filelist = self.filenames.values()
-        filelist.sort()
+        filelist = sorted(self.filenames.values())
         for filename in filelist:
             print(filename, file=outfile)
 
@@ -1872,7 +1869,7 @@
             self.current = nodename
 
             # Have we been dumped already?
-            if self.dumped.has_key(nodename):
+            if nodename in self.dumped:
                 return
             self.dumped[nodename] = 1
 
@@ -2040,7 +2037,7 @@
     if sys.argv[1] == '-H':
         helpbase = sys.argv[2]
         del sys.argv[1:3]
-    if len(sys.argv) <> 3:
+    if len(sys.argv) != 3:
         print('usage: texi2hh [-d [-d]] [-p] [-c] [-3] [-H htmlhelp]', \
               'inputfile outputdirectory')
         sys.exit(2)

Modified: python/branches/py3k/Tools/scripts/treesync.py
==============================================================================
--- python/branches/py3k/Tools/scripts/treesync.py	(original)
+++ python/branches/py3k/Tools/scripts/treesync.py	Fri May 16 17:23:30 2008
@@ -195,7 +195,7 @@
 def okay(prompt, answer='ask'):
     answer = answer.strip().lower()
     if not answer or answer[0] not in 'ny':
-        answer = raw_input(prompt)
+        answer = input(prompt)
         answer = answer.strip().lower()
         if not answer:
             answer = default_answer

Modified: python/branches/py3k/Tools/scripts/xxci.py
==============================================================================
--- python/branches/py3k/Tools/scripts/xxci.py	(original)
+++ python/branches/py3k/Tools/scripts/xxci.py	Fri May 16 17:23:30 2008
@@ -110,7 +110,7 @@
     return sys.stdin.readline()
 
 def askyesno(prompt):
-    s = raw_input(prompt)
+    s = input(prompt)
     return s in ['y', 'yes']
 
 if __name__ == '__main__':


More information about the Python-3000-checkins mailing list