win32file.pyd Device Error on W95

Tim Roberts timr at probo.com
Wed Feb 19 03:05:29 EST 2003


"Marie-Claude Savoie" <marie-claude.savoie at sympatico.ca> wrote:
>
>I had some serial IO code that was working under W95 and later and had
>created it with python
>2.0 and pythonwin 135.  Using the same code now with python 2.2 and
>pythonwin 146 I get a problem on W95 but not on W98 or later.
>
>I have tracked the problem down to win32file.pyd using dependency walker.
>The Winsock has been updated to 2.  The error message that I get is
>
>ImportError: DLL load failed: A device attached to the system is not
>functioning.
>
>I tried using the win32file from build 135 but it caused an error as it
>requires python 2.0 and not 2.2 which I am using now.
>
>In a thread a couple of days ago Wouter van Ooijen also has a problem with
>W95 and win32file. It seems slightly different but may be related.  Something 
>was changed in win32file between build 135 and build 146  that is now causing 
>it to crash on W95.

It's the same problem.  The new win32file.pyd has two problems with Win95:
it needs Winsock2 (which you can download), and it tries to use CancelIO,
which is not in Win95's kernel32.

>I need my code to work with W95 and above, and this is causing serious
>problems.  Any ideas would be appreciated.

I can think of three solutions.  One, do your Win95 users a favor and tell
them to upgrade.  Win95 really is an unsatisfactory solution.  Two, go back
to Python 2.1.  Three, fetch the source and build a patch.

Option two is probably the most reasonable.  If you want to use state of
the art features in Python, you need to use an operating system less than 8
years old.

Personally, I'm not in favor of a permanent patch; there are going to be
more and more things we want to do that Win95 doesn't support.  We have to
draw the line somewhere.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.




More information about the Python-list mailing list