Question about Reading Files

genxtech jrmy.lnrd at gmail.com
Sun Sep 5 21:06:44 EDT 2010


On Sep 5, 4:16 am, Peter Otten <__pete... at web.de> wrote:
> genxtech wrote:
> > Hello.  I am still really new to python and I have a project where I
> > am trying to use the data files from another program and write a new
> > program with new user interface and all.  My first step was to open
> > one of the files in 'rb' mode and print the contents, but I am
> > unfamiliar with the format.  Here is what was printed to the terminal:
>
> > b'URES\x04\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f
> > \x00\x00\x00\x03\t\x00c\x01\x00\x00\x0c#\x00\x00\x02\x1b\x00\x00\x00Y
> > \x00\x00\x00\x08\x98"\x00\x00t\x00\x00\x00\x01\'\x01\x00\x00z$
> > \x00\x00\x04,\xa7\x00\x00\xa1%\x00\x00\x05\x0b\x00\x00\x00o$\x00\x00\n
> > \x11\x00\x00\x00\xcd\xcc\x00\x00\x0b\xf8\x00\x00\x00\xde\xcc
> > \x00\x00\x0c\x19\x00\x00'
>
> > I am using Python 3.1 on a Fedora 13 box if that makes any difference.
> > Any advise on how to decode the data would be greatly appreciated.
>
> What's the name of the file?
> What's the program that uses the file?
> If the source code is available, what library does that program use to read
> the file?
>
> Peter

Unfortunately the source code isn't available, so I'm trying to figure
out a way to get the format of the file on my own.



More information about the Python-list mailing list