|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Zope, Python and win32com loading
Hi anybody
I'm getting Error: module win32com.client not found. I'm Loading in an Extended Module as follows: import win32com.client o=win32com.client.Dispatch('App.Class") (Zope V2.7, Python V2.34 and pyWin32-202 Win32 py2.3 installed.) Much appreciated |
|
#2
|
|||
|
|||
|
It may be because Zope installs and uses its own version of Python, so any extensions that you have installed on a regular version of Python will not be found.
You will need to install the win32all extensions into the Zope directory tree. Dave - The Developers' Coach |
|
#3
|
|||
|
|||
|
Resolved
Dave
Thanks for the pointer. It seems to be that. (Althought I think win32 detect the installation by itself and then install to that subfolder.) I've instead added a Directive in the zope.conf as follows that points to the path of the win32 installation: path C:/Program Files/Python/Lib/site-packages This solved the 'module not loaded' error but resulted in CoInitialize Error. The following seems to solve the error completely: (althought much about single thread/multi thread dynamics still need to be decided, this is for each thread executed) def GetName(sName=""): import pythoncom import win32com.client pythoncom.CoInitialize() o=win32com.client.Dispatch("ZopeTest.cTest") b=o.GetName(sName) return b pythoncom.CoUninitialize() Kind Regards ![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Zope, Python and win32com loading |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|