I am trying to use the python library mosquitto for writing a program for maemo. I am using the package libmosquitto, which provides a mosquitto.py library file (http://mosquitto.org/documentation/python/).
The program import mosquitto using the following line of code:
import mosquitto
The program runs fine on my desktop, but failed on the device with the following error:
NameError: name 'c_bool' is not defined
I am using python2.5 on the device. What am I doing wrong?
c_boolisn’t defined in python 2.5. It’s new in 2.6:http://docs.python.org/library/ctypes.html#ctypes.c_bool
Possibly you could get away with adding
after the line that reads
in
mosquitto.py. Seems sketchy though…