sending a byte on a socket

Pettersen, Bjorn S BjornPettersen at
Wed Aug 27 09:02:14 CEST 2003

> From: Daniel Timothy Bentley [mailto:dbentley at] 
> Slamming my head against what should be an easy problem:
> How do I send a byte across an open, connected socket?
> Do I have to implement my own type that implements some 
> method a string
> normally does?
> Or is there some hidden encoding that will let me turn a byte into a
> string?
> This is surely a simple question for anyone who remembers the answer.

A one character string is a byte...

  byteString = chr(byte)

-- bjorn

More information about the Python-list mailing list