Author: georg.brandl
Date: Mon Jun 11 00:31:37 2007
New Revision: 55865
Modified:
python/branches/p3yk/Tools/i18n/msgfmt.py
python/branches/p3yk/Tools/pybench/Arithmetic.py
python/branches/p3yk/Tools/pybench/CommandLine.py
python/branches/p3yk/Tools/pybench/Numbers.py
python/branches/p3yk/Tools/pybench/systimes.py
python/branches/p3yk/Tools/scripts/classfix.py
python/branches/p3yk/Tools/scripts/fixcid.py
python/branches/p3yk/Tools/scripts/ftpmirror.py
python/branches/p3yk/Tools/scripts/linktree.py
python/branches/p3yk/Tools/scripts/methfix.py
python/branches/p3yk/Tools/scripts/pathfix.py
python/branches/p3yk/Tools/scripts/which.py
python/branches/p3yk/Tools/unicode/makeunicodedata.py
python/branches/p3yk/Tools/webchecker/websucker.py
Log:
Some octal literal fixes in Tools.
Modified: python/branches/p3yk/Tools/i18n/msgfmt.py
==============================================================================
--- python/branches/p3yk/Tools/i18n/msgfmt.py (original)
+++ python/branches/p3yk/Tools/i18n/msgfmt.py Mon Jun 11 00:31:37 2007
@@ -83,7 +83,7 @@
voffsets += [l2, o2+valuestart]
offsets = koffsets + voffsets
output = struct.pack("Iiiiiii",
- 0x950412deL, # Magic
+ 0x950412de, # Magic
0, # Version
len(keys), # # of entries
7*4, # start of key index
Modified: python/branches/p3yk/Tools/pybench/Arithmetic.py
==============================================================================
--- python/branches/p3yk/Tools/pybench/Arithmetic.py (original)
+++ python/branches/p3yk/Tools/pybench/Arithmetic.py Mon Jun 11 00:31:37 2007
@@ -476,9 +476,9 @@
for i in range(self.rounds):
- a = 2220001L
- b = 100001L
- c = 30005L
+ a = 2220001
+ b = 100001
+ c = 30005
c = a + b
c = b + c
@@ -504,9 +504,9 @@
c = b / a
c = c / b
- a = 2220001L
- b = 100001L
- c = 30005L
+ a = 2220001
+ b = 100001
+ c = 30005
c = a + b
c = b + c
@@ -532,9 +532,9 @@
c = b / a
c = c / b
- a = 2220001L
- b = 100001L
- c = 30005L
+ a = 2220001
+ b = 100001
+ c = 30005
c = a + b
c = b + c
@@ -560,9 +560,9 @@
c = b / a
c = c / b
- a = 2220001L
- b = 100001L
- c = 30005L
+ a = 2220001
+ b = 100001
+ c = 30005
c = a + b
c = b + c
@@ -588,9 +588,9 @@
c = b / a
c = c / b
- a = 2220001L
- b = 100001L
- c = 30005L
+ a = 2220001
+ b = 100001
+ c = 30005
c = a + b
c = b + c
Modified: python/branches/p3yk/Tools/pybench/CommandLine.py
==============================================================================
--- python/branches/p3yk/Tools/pybench/CommandLine.py (original)
+++ python/branches/p3yk/Tools/pybench/CommandLine.py Mon Jun 11 00:31:37 2007
@@ -82,7 +82,7 @@
else:
f = open(name, mode)
if 'w' in mode:
- os.chmod(name, 0600)
+ os.chmod(name, 0o600)
return f
def option_dict(options):
Modified: python/branches/p3yk/Tools/pybench/Numbers.py
==============================================================================
--- python/branches/p3yk/Tools/pybench/Numbers.py (original)
+++ python/branches/p3yk/Tools/pybench/Numbers.py Mon Jun 11 00:31:37 2007
@@ -598,185 +598,185 @@
for i in range(self.rounds):
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
-
- 1234567890L < 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L == 3456789012345L
- 1234567890L > 3456789012345L
- 1234567890L < 3456789012345L
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
+
+ 1234567890 < 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 == 3456789012345
+ 1234567890 > 3456789012345
+ 1234567890 < 3456789012345
def calibrate(self):
Modified: python/branches/p3yk/Tools/pybench/systimes.py
==============================================================================
--- python/branches/p3yk/Tools/pybench/systimes.py (original)
+++ python/branches/p3yk/Tools/pybench/systimes.py Mon Jun 11 00:31:37 2007
@@ -180,9 +180,9 @@
### Testing
def some_workload():
- x = 0L
- for i in range(10000000L):
- x = x + 1L
+ x = 0
+ for i in range(10000000):
+ x = x + 1
def test_workload():
print 'Testing systimes() under load conditions'
Modified: python/branches/p3yk/Tools/scripts/classfix.py
==============================================================================
--- python/branches/p3yk/Tools/scripts/classfix.py (original)
+++ python/branches/p3yk/Tools/scripts/classfix.py Mon Jun 11 00:31:37 2007
@@ -129,7 +129,7 @@
# First copy the file's mode to the temp file
try:
statbuf = os.stat(filename)
- os.chmod(tempname, statbuf[ST_MODE] & 07777)
+ os.chmod(tempname, statbuf[ST_MODE] & 0o7777)
except os.error as msg:
err('%s: warning: chmod failed (%r)\n' % (tempname, msg))
# Then make a backup of the original file as filename~
Modified: python/branches/p3yk/Tools/scripts/fixcid.py
==============================================================================
--- python/branches/p3yk/Tools/scripts/fixcid.py (original)
+++ python/branches/p3yk/Tools/scripts/fixcid.py Mon Jun 11 00:31:37 2007
@@ -174,7 +174,7 @@
# First copy the file's mode to the temp file
try:
statbuf = os.stat(filename)
- os.chmod(tempname, statbuf[ST_MODE] & 07777)
+ os.chmod(tempname, statbuf[ST_MODE] & 0o7777)
except os.error as msg:
err(tempname + ': warning: chmod failed (' + str(msg) + ')\n')
# Then make a backup of the original file as filename~
Modified: python/branches/p3yk/Tools/scripts/ftpmirror.py
==============================================================================
--- python/branches/p3yk/Tools/scripts/ftpmirror.py (original)
+++ python/branches/p3yk/Tools/scripts/ftpmirror.py Mon Jun 11 00:31:37 2007
@@ -375,7 +375,7 @@
return
dirname = os.path.dirname(pathname)
if dirname: makedir(dirname)
- os.mkdir(pathname, 0777)
+ os.mkdir(pathname, 0o777)
# Write a dictionary to a file in a way that can be read back using
# rval() but is still somewhat readable (i.e. not a single long line).
Modified: python/branches/p3yk/Tools/scripts/linktree.py
==============================================================================
--- python/branches/p3yk/Tools/scripts/linktree.py (original)
+++ python/branches/p3yk/Tools/scripts/linktree.py Mon Jun 11 00:31:37 2007
@@ -31,7 +31,7 @@
print oldtree + ': not a directory'
return 1
try:
- os.mkdir(newtree, 0777)
+ os.mkdir(newtree, 0o777)
except os.error as msg:
print newtree + ': cannot mkdir:', msg
return 1
@@ -63,7 +63,7 @@
if os.path.isdir(oldname) and \
not os.path.islink(oldname):
try:
- os.mkdir(newname, 0777)
+ os.mkdir(newname, 0o777)
ok = 1
except:
print newname + \
Modified: python/branches/p3yk/Tools/scripts/methfix.py
==============================================================================
--- python/branches/p3yk/Tools/scripts/methfix.py (original)
+++ python/branches/p3yk/Tools/scripts/methfix.py Mon Jun 11 00:31:37 2007
@@ -140,7 +140,7 @@
# First copy the file's mode to the temp file
try:
statbuf = os.stat(filename)
- os.chmod(tempname, statbuf[ST_MODE] & 07777)
+ os.chmod(tempname, statbuf[ST_MODE] & 0o7777)
except os.error as msg:
err('%s: warning: chmod failed (%r)\n' % (tempname, msg))
# Then make a backup of the original file as filename~
Modified: python/branches/p3yk/Tools/scripts/pathfix.py
==============================================================================
--- python/branches/p3yk/Tools/scripts/pathfix.py (original)
+++ python/branches/p3yk/Tools/scripts/pathfix.py Mon Jun 11 00:31:37 2007
@@ -121,7 +121,7 @@
# First copy the file's mode to the temp file
try:
statbuf = os.stat(filename)
- os.chmod(tempname, statbuf[ST_MODE] & 07777)
+ os.chmod(tempname, statbuf[ST_MODE] & 0o7777)
except os.error as msg:
err('%s: warning: chmod failed (%r)\n' % (tempname, msg))
# Then make a backup of the original file as filename~
Modified: python/branches/p3yk/Tools/scripts/which.py
==============================================================================
--- python/branches/p3yk/Tools/scripts/which.py (original)
+++ python/branches/p3yk/Tools/scripts/which.py Mon Jun 11 00:31:37 2007
@@ -35,7 +35,7 @@
msg(filename + ': not a disk file')
else:
mode = S_IMODE(st[ST_MODE])
- if mode & 0111:
+ if mode & 0o111:
if not ident:
print filename
ident = st[:3]
Modified: python/branches/p3yk/Tools/unicode/makeunicodedata.py
==============================================================================
--- python/branches/p3yk/Tools/unicode/makeunicodedata.py (original)
+++ python/branches/p3yk/Tools/unicode/makeunicodedata.py Mon Jun 11
00:31:37 2007
@@ -757,7 +757,7 @@
h = 0
for c in map(ord, s.upper()):
h = (h * magic) + c
- ix = h & 0xff000000L
+ ix = h & 0xff000000
if ix:
h = (h ^ ((ix>>24) & 0xff)) & 0x00ffffff
return h
Modified: python/branches/p3yk/Tools/webchecker/websucker.py
==============================================================================
--- python/branches/p3yk/Tools/webchecker/websucker.py (original)
+++ python/branches/p3yk/Tools/webchecker/websucker.py Mon Jun 11 00:31:37 2007
@@ -119,7 +119,7 @@
print "Huh? Don't know how to make dir", dir
return
makedirs(head)
- os.mkdir(dir, 0777)
+ os.mkdir(dir, 0o777)
if __name__ == '__main__':
sys.exit(main() or 0)
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins