How to convert int to 24bit string?
<p>for read I use:</p>

<pre><code>def UI24(t):
    result = 0
    for i in xrange(3):
        result = (result &lt;&lt; 8);
        byte = unpack('&gt;b',t[i-1])
        result += byte;
    return result
</code></pre>

<p>and for write ?</p>
