my first socket !

Franck Bui-Huu Franck.BUI-HUU at gemplus.com
Tue Feb 18 04:15:53 EST 2003


Hi,

I'm currently trying to receive data from a socket with
data = mysock.recv(LENGTH)
the fisrt byte of data is the length of data to receive.
If I print the length I get : print data[0] -> "\x04"
How can I "cast" it in order to handle it as an int whose value is 4 ?

thanks






More information about the Python-list mailing list