[Twisted-Python] twisted reactor under win32 (test SerialPort)
iammegatron at gmail.com
Mon Sep 29 18:11:33 EDT 2008
Hi,I try to use twisted for asynchronous serial port read().
Here is my simple twisted code:
from twisted.internet import reactor
from twisted.internet.serialport import SerialPort
from twisted.internet.protocol import Protocol
def dataReceived(self, data):
SerialPort(Client(), 'COM4', reactor)
It runs on my Mac with this line changed to SerialPort(Client,
'dev/tty.usbserial-A4001mLL', reactor) which is my Arduino board device.
But on Windows XP, it gave the error message:
"AttributeError: 'module' object has no attribute 'addEvent' "
I tried to used different reactor, such as selectreactor, win32eventreactor,
but the error message became "AssertionError: reactor already installed"
Please help. Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python