Thanks~~<br><br><div class="gmail_quote">On Wed, Apr 23, 2008 at 7:41 AM, Christopher Armstrong <<a href="mailto:radix@twistedmatrix.com">radix@twistedmatrix.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tue, Apr 22, 2008 at 7:32 PM, Xian Chen <<a href="mailto:hoganxian@gmail.com">hoganxian@gmail.com</a>> wrote:<br>
> In Twisted, do the user need to take care of the big/little-endian issues?<br>
<br>
</div>The basic Twisted protocol system is purely in terms of bytes,<br>
represented by the Python 'str' type.<br>
<div class="Ih2E3d"><br>
> For example, I receive a buffer via UDP which actually represents a unsinged<br>
> int value. So, how can i convert this buffer[0:1] to unsigned int ?<br>
<br>
</div>Check out the 'struct' Python module,<br>
<a href="http://docs.python.org/lib/module-struct.html" target="_blank">http://docs.python.org/lib/module-struct.html</a><br>
<br>
--<br>
Christopher Armstrong<br>
International Man of Twistery<br>
<a href="http://radix.twistedmatrix.com/" target="_blank">http://radix.twistedmatrix.com/</a><br>
<a href="http://twistedmatrix.com/" target="_blank">http://twistedmatrix.com/</a><br>
<a href="http://canonical.com/" target="_blank">http://canonical.com/</a><br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br>