Updating to python 3 with 2to3. Check llvm/py3k_update.diff and llvm/py3k_update.out for the output from this.

This commit is contained in:
AndrewBC 2011-06-11 20:39:16 -05:00
commit 6d50a337ad
29 changed files with 3455 additions and 143 deletions

View file

@ -26,7 +26,7 @@ def gen(f):
idx = 1
for i in intr:
s = 'INTR_' + i.upper()
print '%s = %d' % (s.ljust(maxw), idx)
print('%s = %d' % (s.ljust(maxw), idx))
idx += 1
gen(sys.argv[1])

View file

@ -21,5 +21,5 @@ for line in file(INF):
outf = open(OUTF, 'wt')
i = 0
while i < len(intrs):
print >>outf, "`" + "`,`".join(intrs[i:min(i+NCOLS,len(intrs)+1)]) + "`"
print("`" + "`,`".join(intrs[i:min(i+NCOLS,len(intrs)+1)]) + "`", file=outf)
i += NCOLS