Am 02.05.2012 22:05, schrieb Thomas Heller:
class GPIO(BitVector):
def __init__(self, address, value=0xFF, nbits=8):
self.address = address
super(GPIO, self).__init__(value, nbits)
def _get_value(self):
"read an 8-bit value from the hardware as 8-bit integer"
...
def _set_value(self, v):
"write the 8-bit value 'v' to the hardware"
...
Sorry, forgot to create the property; so please add this
to the class definition:
_value = property(_get_value, _set_value)
Thomas
--
http://mail.python.org/mailman/listinfo/python-list