|| at Feb 18, 2003 at 9:31 am
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 -> "\x04"
How can I "cast" it in order to handle it as an int whose value is 4 ?
You can use the 'ord' and 'chr' functions to convert between a character
and its code.
They are using 8bit integers in range(256). If you want to send bigger
1. Create your own conversion function (e.g. send more digits with
2. Use the Pickle or cPickle to temporary convert the object into a
From j.heylenAToption.com Tue Feb 18 10:38:06 2003
From: j.heylenAToption.com (Jan Heylen)
Date: Tue, 18 Feb 2003 10:38:06 +0100
Subject: CIM/WMI pcmcia power cycle with python
I was wondering if it is possible to power off/on a pcmcia slot/card
from python. Most likely with the wmi interface?
If it is possible, has somebody done it? Can I see some sample code
somewhere? Some tips?