[Tutor] How to convert integer to binay packed string...,?

Ignacio Vazquez-Abrams ignacio@openservices.net
Tue, 11 Sep 2001 02:52:31 -0400 (EDT)


On Tue, 11 Sep 2001, Ajaya Babu wrote:

> I've a small doubt, How to convert integers into bytestream in python. What
> actually I want to do is send integer to another system in the network. But
> since there is nothing like integer in python...I am just wondering how can
> i manipulate a integer to a string of two bytes which corresponds to the two
> binary coded bytes of the integer.

  http://www.python.org/doc/current/lib/module-struct.html

-- 
Ignacio Vazquez-Abrams  <ignacio@openservices.net>