[python-win32] Module not found weirdness
Tim Roberts
timr at probo.com
Wed Sep 20 00:43:35 CEST 2006
Derick Van Niekerk wrote:
> You ran dependency walker on which file?
>
>
> I ran it on python.exe, pressed F7, then loaded my .py file by
> specifying the filename in the arguments field.
You might try running the dependency walker on
site-packages/win32/win32clipboard.pyd just in case, but I suspect you
won't find anything.
> How are you running this? Are you running it from a command line, or
> from inside an IDE, or double-clicking on the desktop, or what?
>
>
> I get the same errors whether I run it via the comand line, desktop
> double-click (quick read to see the errors)
> or SPE (my IDE of choice). The dlls are found, the problem is with the
> SetClipboardViewer
> function - which, I assume is a module inside a dll (user32.dll, I
> believe). I might be assuming too
> much - It could be something else entirely, but it seems to only
> affect SetClipboardViewer.
win32clipboard.SetClipboardViewer is a function inside of
win32clipboard.pyd, which is a DLL in the Python directory. It,
eventually, calls SetClipboardViewer inside of user32.dll. User32.dll
has been a part of Windows since 1992; I'm 100% confident you'll find
the problem in the Python wrapper somewhere.
On a whim, can you try checksumming the DLL? I'm running pywin32-204.
If you have the same version, you should get the same number:
C:\Apps\Python24\Lib>python
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii
>>>
hex(binascii.crc32(file('site-packages/win32/win32clipboard.pyd').read()))
'-0x17a3560a'
>>>
> Is there any way I could have broken the clipboard view chain in a way
> that doesn't fix itself after a restart?
No, that's all in-memory. If it were me, I'd load up Python.exe in a C
debugger and single-step through the function call, but then I'm not
like most people...
I did try the cookbook script here, and it works fine.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-win32
mailing list