Ran 2to3 over scripts directory.

This commit is contained in:
Georg Brandl 2008-05-16 15:23:30 +00:00
parent d11ae5d6ec
commit 8efadf5d66
19 changed files with 74 additions and 86 deletions

View file

@ -46,19 +46,19 @@ def main():
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)