Incompatible .pyd files with Python 2.0 (and win32comm)

Peter Hansen peter at engcorp.com
Thu Oct 19 23:14:32 EDT 2000


Willy Heineman wrote:
> 
> Win32comm is what I considered at the time a stopgap until Mark got
> around to that particular recess of the Win32 API. I will be updating the
> files this weekend including a Python 2.0 version (source will be
> provided). I urge all new development to look at Mark's stuff instead.

Nice to see everybody singing from the same sheet.  :-)

With the new support Mark added, I was able to make three small changes
to the code we used (originally based on your commtest.py) and it now
supports both Python v1.5.2 with win32comm, and Python 2.0 with the new
win32file support.  Thank god and BDFL for non-static typing of this
would have been much harder.

In case anyone cares, the things I changed were (sorry for no code
posting, I'm at home right now):

1. For v2.0, "win32comm = win32file" after importing win32file, to
minimize subsequent source changes (this is temporary, therefore the
hack is acceptable to me) by leaving references to win32comm alone.

2. GetCommState() now returns the "dcb" information, instead of having
to be passed an empty one for filling.

3. SetCommTimeouts() now takes a tuple of five timeout values rather
than a COMMTIMEOUTS object.

I want to thank you (Willy) for your "stopgap" solution which proved
very useful here since April, and Mark for adding this to win32all.  And
I want to thank my agent, and the makeup crew, and my parents, and ....

-- 
Peter Hansen
Kaval Telecom Inc.



More information about the Python-list mailing list