Python scripts now compatible with both 2.x and 3.x releases of python
This commit is contained in:
@@ -4,14 +4,13 @@ import sys
|
||||
|
||||
t=str(sys.argv[1])
|
||||
|
||||
print("char stdlib_" + t + "_code[] = { ")
|
||||
sys.stdout.write("char stdlib_" + t + "_code[] = {\n")
|
||||
|
||||
num = 0
|
||||
for line in sys.stdin:
|
||||
for c in line:
|
||||
num+=1
|
||||
print("0x%0.2X, " % ord(c), end="")
|
||||
sys.stdout.write("0x%0.2X, " % ord(c))
|
||||
if num%16 == 0:
|
||||
print()
|
||||
|
||||
print("0 };")
|
||||
sys.stdout.write("\n")
|
||||
sys.stdout.write("0 };\n")
|
||||
|
||||
Reference in New Issue
Block a user