[Tutor] Parse MPL files

Alan Gauld alan.gauld at btinternet.com
Sat Jan 8 15:17:05 CET 2011


>> Parts of the data is inaccessible (very large parts in fact).The
>> structure is like that:

It is binary data so you need to open the file with a b flag (rb or 
wb)
and you will probably need to use the struct module to convert
the binary data into normal Pyython data types.

Search the internet for a description of the file format, it will
be easier than trying to figure it out by hand.

>> How to set up a hex editor ?

You don;t need an editor just a display.
The standard Linux tool is od(octal dump) which takes
various flags to display hex/strings etc. (Try man od)
If on Windows use debug from the command line and
use the d command within debug...

If you use emacs it has a hex mode that can edit binary filess too.
And I think vim can do it but have never tried...

> not text. To use Bless, run sudo apt-get install bless on Ubuntu and
> variants, for Windows try HxD, http://mh-nexus.de/en/hxd/.

You only need bless and its cousins if you want to modify the
data which you probably don't!

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list