Hi there,<div><br></div><div>I am trying to understand how xdrlib works as I want to read files in this format. The problem is I don't much about xdr (although I read <a href="http://docs.python.org/library/xdrlib.html" target="_blank">http://docs.python.org/library/xdrlib.html</a> and RFC 1832).</div>


<div><br></div><div>Another problem is I don't know how the file I want to read was encoded.</div><div><br></div><div>So when I do something like:</div><div><br></div><div>import xdrlib</div><div><br></div><div>f = open('file.xdr').read()</div>


<div>data = xdrlib.Unpacker(f)</div><div><br></div><div>Then, I don't know which "unpack_*" to use.</div><div><br></div><div>If I use,</div><div><br></div><div>repr(data.unpack_string())</div><div><br></div>


<div>sometimes it returns something meaningful like:</div><div><br></div><div>"'Ryckaert-Bell.'"</div><div><br></div><div>but other times,</div><div><br></div><div>'\x00\x00\x00\x04Bond\x00\x00\x00\x05Angle\x00\x00\x00\x00\x00\x00\x0bProper Dih.\x00'</div>


<div><br></div><div>if not a error.</div><div><br></div><div>Well, as you see, I am a bit lost here and any hint would be very appreciated.</div><div><br></div><div>Thanks in advance,</div><div><br></div><div>Alan</div><div>

<br>-- <br>Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate<br>Department of Biochemistry, University of Cambridge. <br>80 Tennis Court Road, Cambridge CB2 1GA, UK.<br>
>><a href="http://www.bio.cam.ac.uk/~awd28" target="_blank">http://www.bio.cam.ac.uk/~awd28</a><<<br>
</div>