Unable to read .cdb file using Python

313 Views Asked by At

I have a .cdb file generated by a 3d-printing software that I assume saves all the printing parameters, and on my machine the size of the file is 25.7 MB. I tried reading the file using Python pure-cdb library. However, after running this code:

import cdblib
with open('First.cdb', 'rb') as f:
    data = f.read()
reader = cdblib.Reader64(data)
for key, value in reader.iteritems():
print('+{},{}:{}->{}'.format(len(key), len(value), key, value))

I do not get any output. In contrast, when I run

len(reader)

I get 5815070385157957162 as the output.

What may be causing it and how can I read the file in the human-readable format?

0

There are 0 best solutions below