Traceback (most recent call last):
File "C:\Documents and Settings\Derick\Desktop\test.py", line 73, in ?
frame = TestFrame ()
File "C:\Documents and Settings\Derick\Desktop\test.py", line 23, in __init__
self.nextWnd = win32clipboard.SetClipboardViewer (self.hwnd)
pywintypes.error: (126, 'SetClipboardViewer', 'The specified module could not be found.')
Script terminated.
File "C:\Documents and Settings\Derick\Desktop\test.py", line 73, in ?
frame = TestFrame ()
File "C:\Documents and Settings\Derick\Desktop\test.py", line 23, in __init__
self.nextWnd = win32clipboard.SetClipboardViewer (self.hwnd)
pywintypes.error: (126, 'SetClipboardViewer', 'The specified module could not be found.')
Script terminated.
I have run dependency walker and found that all the dlls load fine. The other win32clipboard functions work fine as well, like getting and setting the clipboard contents. I have found that SetClipboardViewer ( self.hwnd) should be in user32.dll but I have the same version installed as on my PC at work where the program runs without a problem.
The strange thing is that all the other functions I tried work fine, which would indicate that I might be using an old version of some dll - the function might not exist in the module dll I'm using. user32 doesn't seem at fault though since it is the same on both PC's...
What could be the problem? Google couldn't teach me anything on this problem
This code doesn't work:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/355593
But this does - even though it uses the same module:
import win32clipboard as w
import win32con
def getText():
w.OpenClipboard()
d=w .GetClipboardData(win32con.CF_TEXT)
w.CloseClipboard()
return d
def setText(aType,aString):
w.OpenClipboard()
w.EmptyClipboard ()
w.SetClipboardData(aType, aString)
w.CloseClipboard()
-d-
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32