summaryrefslogtreecommitdiff
path: root/pokemontools/tcgdisasm.py
diff options
context:
space:
mode:
authorEevee (Lexy Munroe) <eevee.git@veekun.com>2016-08-24 15:43:15 -0700
committerEevee (Lexy Munroe) <eevee.git@veekun.com>2016-08-24 15:43:15 -0700
commita64657988a50522885618998e7f14168c299a19b (patch)
tree9240aab0fba75befe75d6059d62bea8a3e0fbd4e /pokemontools/tcgdisasm.py
parent0e1798937a4bf723813574281d0dc12c471c9199 (diff)
Fix most Python 3 compat issues with futurize --stage1
Diffstat (limited to 'pokemontools/tcgdisasm.py')
-rwxr-xr-xpokemontools/tcgdisasm.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pokemontools/tcgdisasm.py b/pokemontools/tcgdisasm.py
index 2e9e8b3..e34d944 100755
--- a/pokemontools/tcgdisasm.py
+++ b/pokemontools/tcgdisasm.py
@@ -2,6 +2,8 @@
"""
GBC disassembler, specialized for TCG macros
"""
+from __future__ import print_function
+from __future__ import absolute_import
import os
import sys
@@ -10,9 +12,9 @@ from ctypes import c_int8
import random
import json
-import configuration
-import labels
-import wram
+from . import configuration
+from . import labels
+from . import wram
# New versions of json don't have read anymore.
if not hasattr(json, "read"):
@@ -663,7 +665,7 @@ class Disassembler(object):
"""
bank_id = original_offset / 0x4000
- if debug: print "bank id is: " + str(bank_id)
+ if debug: print("bank id is: " + str(bank_id))
last_hl_address = None #for when we're scanning the main map script
last_a_address = None
@@ -995,4 +997,4 @@ if __name__ == "__main__":
else:
output = "Func_{:02x}: ; {:02x} ({:0x}:{:02x})\n".format(addr, addr, addr / 0x4000, addr % 0x4000 + 0x4000)
output += disasm.output_bank_opcodes(addr)[0]
- print output
+ print(output)