Python: num to bytes
<p>I want to have a byte representation of some numbers. For example, a byte array whose first byte has a meaning (0-255), the second byte another (0-255) and so on. Since string are byte arrays i can easily represent it as "aB" if I want to store 97 and 66.
Now, if i want the third and forth bytes to represent a number between 0 and 65535, how can I do?</p>

<p>Ps: I'm using python 2.5, so I cannot take advantage of the functions to manipulate bytes (like bytes() and bytearray()) that have been introduced lately.</p>

<p>edit:
0-65536 -> 0-65535</p>
