[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819

Jan Luebbe jluebbe at debian.org
Sat Aug 6 08:17:16 UTC 2011


The following commit has been merged in the debian branch:
commit 002f4687baa233cecb73a442efb208d9aaf61f46
Author: Jan Luebbe <jluebbe at debian.org>
Date:   Thu Jul 9 15:02:30 2009 +0200

    add tool to dump the binary cell db

diff --git a/tools/dump_cell_db.py b/tools/dump_cell_db.py
new file mode 100644
index 0000000..9118547
--- /dev/null
+++ b/tools/dump_cell_db.py
@@ -0,0 +1,30 @@
+from sys import stdin, stdout, stderr, argv
+from math import sqrt
+from struct import calcsize, pack, unpack
+
+CELL_DB = 'cell.db'
+LA_DB = 'la.db'
+
+def dump_cell_db():
+    cell_db = file(CELL_DB, 'rb')
+    format = '!HHHHffff'
+    format_size = calcsize(format)
+    data = cell_db.read(format_size)
+    while data:
+        print unpack(format, data)
+        data = cell_db.read(format_size)
+    cell_db.close()
+
+def dump_la_db():
+    la_db = file(LA_DB, 'rb')
+    format = '!HHHffff'
+    format_size = calcsize(format)
+    data = la_db.read(format_size)
+    while data:
+        print unpack(format, data)
+        data = la_db.read(format_size)
+    la_db.close()
+
+if __name__=="__main__":
+    dump_cell_db()
+    dump_la_db()

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list