REPOST: Re: values of sys.platform? for a serial port lib
cliechti at gmx.net
Sun Dec 30 13:33:22 CET 2001
Peter Hansen <peter at engcorp.com> wrote in
news:3C2E82A5.D4E1EEB3 at engcorp.com:
> Chris Liechti wrote:
>> i also have an optional argument to specify the port string, but when
>> this is used it isn't portable anymore.
> Just a thought, but could you make this the same argument as
> the port number, allowing either an integer or a string?
> I could also see a benefit, in a cross-platform serial-port app,
> in having a method to return the actual device name in use, for
> display/troubleshooting purposes, even if specified as a number.
minutes after i wrote the that message, i changed the code so that it is
the same argument that takes a number or a string.
i'll add a method to return the device name.
> You may know this already, but in Windows you need to use
> "overlapped" I/O operations if you want to be able to have
> a read thread and a write thread waiting independently on
> operations on the same serial port. Without this, any time
> one thread is blocked waiting for results for its operation,
> the other thread will also block when it tries to access the
> device even if its operation would not otherwise block.
> (Or something like that... I don't know the full details
> behind it, only what I learned trying to implement a win32file-
> based serial port class which didn't have this limitation.)
it uses overlapped io. it's roughly based on the serial example that comes
with the win32all package.
Chris <cliechti at gmx.net>
========= WAS CANCELLED BY =======:
From: Chris Liechti <cliechti at gmx.net>
Subject: cmsg cancel <Xns91878A529880Fcliechtigmxnet at 188.8.131.52>
Control: cancel <Xns91878A529880Fcliechtigmxnet at 184.108.40.206>
Date: Mon, 31 Dec 2001 04:08:23 GMT
Organization: A poorly-installed InterNetNews site
Message-ID: <cancel.Xns91878A529880Fcliechtigmxnet at 220.127.116.11>
X-Trace: news2.kornet.net 1009774258 27193 18.104.22.168 (31 Dec 2001 04:50:58 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 04:50:58 +0000 (UTC)
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)
This message was cancelled from within Mozilla.
More information about the Python-list