[python-win32] pywintypes24.dll necessary??

Bob Gailer bgailer at alum.rpi.edu
Thu Jun 22 21:51:46 CEST 2006

Dean Allen Provins wrote:
> Hello:
> The user's requirement was for a batch program to process hundreds of files - so
> I wrote one on Linux, and ported it to WinXP Professional.  It is a command line
> driven routine that works very well on Linux, but is hampered (as I discovered)
> by the MS treatment of DOS windows (no copy/paste allowed - as far as I can tell).
> It works fine, EXCEPT the python mainline (batch.py) suggests that it will NOT
> execute unless file 'pywintypes24.dll' is in the same directory.  A dialog pops
> up to say that the application can't execute because a required component (the
> DLL) can't be found, but then it starts up with the message:
> "import testing -> failed:  DLL load failed:  The specified module could not be
> found."
> and continues, apparently normally.  I'm not importing anything called
> "testing".  The message is annoying and impacts the credibility of the code (and
> me).
> Since the user's data might be in different places (at different times) it is a
> little inconvenient for them to ensure that the mainline and the DLL are
> conveniently located to minimize typing long path names to the data.  This
> results from Windows users being so used to "clicking" that they've forgotten
> how to work at the command line, so to cut down on the typing, it is necessary
> to move the mainline, and the DLL file to the data directory.
2 suggestions:

1 - DOS windows support copy/paste. Click the system menu, properties, 
options, edit options. Ensure both are checked. Click the system menu, 
edit, you will see Mark, Copy, Paste. You can Mark by dragging a 
selection rectangle with the mouse, Copy the selection by hitting Enter, 
and paste by right clicking.

2 - Create a batch file containing all the messy path and file names. 
Have the user run the batch file. User can do that from the Explorer if 
he does not need to provide any parameters. If user needs to see the 
results in the DOS window put PAUSE at the end of the batch file.

Bob Gailer

More information about the Python-win32 mailing list