<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I need to print variables out over serial, however I need them to not be<br>
in ASCII, ie if the variable is 5 then print 5 not "5".<br>
<br>
The function that writes to the serial port requires a string and I can<br>
send non-variables out with the string "/x05" for 5.<br>
<br>
Is this even possible?<br></blockquote></div><div><br></div>Check out the struct module.<br><div><br></div><div>>>> a = 5</div><div>>>> struct.pack("b", a)</div><div>'\x05'</div><div><br>

</div><div>--S</div>