FAQ

On Wed, Aug 27, 2003 at 02:02:14AM -0500, Pettersen, Bjorn S wrote:
From: Daniel Timothy Bentley [mailto:dbentley at stanford.edu]

Slamming my head against what should be an easy problem:

How do I send a byte across an open, connected socket?
[...]
A one character string is a byte...

byteString = chr(byte)
Calculating and sending single bytes at a time is probably unnecessarily
painful, though. It wouldn't surprise me if the original poster finds that
the struct module makes their life much easier:
http://www.python.org/doc/lib/module-struct.html

-Andrew.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedAug 27, '03 at 6:38a
activeAug 27, '03 at 7:18a
posts4
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase