[Twisted-Python] Fwd: SerialPort.loseConnection() in Win32, workaround

biziap biziap fetbiz at gmail.com
Tue Jun 23 04:57:37 EDT 2009

I have finished the neat version of using the SerialPort in Win32.
Without the bothering loseConnection tracebacks.
First of all, I have to apology for the mistake in my last post.
I claimed that calling the flashInput and flashOutput can be used as
the workaround.I am wrong.
The way I use with SerialPort is different from the standard way:

SerialPort(protocol_instance, comport, reactor, baudrate)

instead, I create a SerialConnect and connect the serial port by:

connector = reactor.connectWith(SerialConnector,comport,baudrate,factory)

I welcome someone else to improve this connector for it to be more reliable
if this approach is worthy. For the script, please see the attachment.

BTW:  I am not sure if it is proper to attach the script in mail list.
I tried to paste it in the mail body. After pasting it into the gmail's
the format of the script is terrible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090623/b1c3d66f/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_serialport2.py
Type: text/x-python
Size: 3829 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20090623/b1c3d66f/attachment.py 

More information about the Twisted-Python mailing list