aboutsummaryrefslogtreecommitdiff
path: root/write-brlyt.py
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2009-01-29 21:31:58 -0500
committercomex <comexk@gmail.com>2009-01-29 21:31:58 -0500
commit3ed275668014bbe6c50489652aa04e3764fbd9f2 (patch)
treee7fa878a16093d6832814098d2940491f44776ac /write-brlyt.py
parent5264bd8c3e9fa48750b0ced76c07e04ef039e430 (diff)
pointless features
Diffstat (limited to '')
-rw-r--r--write-brlyt.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/write-brlyt.py b/write-brlyt.py
index a424e11..79b47be 100644
--- a/write-brlyt.py
+++ b/write-brlyt.py
@@ -5,6 +5,18 @@ f = open(sys.argv[1], 'r')
chunks = eval(f.read())
f.close()
+# ugly hack
+def flatten(chunks):
+ a = []
+ for c in chunks:
+ if type(c) == list:
+ a += flatten(c)
+ else:
+ a.append(c)
+ return a
+chunks = flatten(chunks)
+
+
rlyt = 'RLYT\xfe\xff\x00\x08\x00\x00\x00\x00' # size later
rlyt += struct.pack('>hh', 0x10, len(chunks))