newbie sending hex values over UDP socket

Grant Edwards grante at visi.com
Tue Sep 14 15:58:12 EDT 2004


On 2004-09-14, Bill Seitz <fluxent at yahoo.com> wrote:

> OK, so I'm clear on sending a string.
>
> If I want to send a numeric value, do I use something like
>   struct.pack('b',int)
> ?

That will work, but for single characters, chr() is simpler:

    chr(int)

-- 
Grant Edwards                   grante             Yow!  MMM-MM!! So THIS is
                                  at               BIO-NEBULATION!
                               visi.com            



More information about the Python-list mailing list