ref: b85d9b86add29a64eec6a48f4a69054641213853
parent: 86cb61dbe8691bb04da02007996b008bd1fa3091
author: Bryan Bishop <[email protected]>
date: Sun Jul 1 04:55:21 EDT 2012
use os.path.join instead of cowboying it
--- a/extras/romstr.py
+++ b/extras/romstr.py
@@ -50,7 +50,7 @@
""" Loads labels from labels.json, or parses the source code file and
generates new labels.
"""
- filename = os.path.dirname(__file__) + "/" + filename
+ filename = os.path.join(os.path.dirname(__file__), filename)
# blank out the hash
self.labels = {}
@@ -75,7 +75,7 @@
# scan the asm source code for labels
if generate_labels:
- asm = open(os.path.dirname(__file__) + "/../main.asm", "r").read().split("\n")
+ asm = open(os.path.join(os.path.dirname(__file__), "../main.asm"), "r").read().split("\n")
for line in asm:
label = get_label_from_line(line)