Hi: I installed the "PyXml" package, and appear in the "c:\Python24\Lib\site-packages" folder and i want to import a module of that library from an external method: "import xml.dom.ext" But i can't import from an external method any of the modules that are in the "Lib\site-packages" folder of my python instalation. Why can't import them? By default an external method have acces to modules that are in "Lib\site-packages" of a Python installation? I use Zope 2.7.6 for windows and Python2.4 ("c:\Python24\Lib\site-packages" !) The error that i get is: " Site Error An error was encountered while publishing this resource. Error Type: ImportError Error Value: No module named ext " and the trace: " Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PythonScripts.PythonScript, line 323, in _exec Module None, line 31, in callServiceResume - <PythonScript at /approach/SiccApproach/serviceResume/callServiceResume> - Line 31 Module Products.ExternalMethod.ExternalMethod, line 216, in __call__ Module Products.ExternalMethod.ExternalMethod, line 157, in reloadIfChanged Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction Module App.Extensions, line 148, in getObject - __traceback_info__: ('C:\\Program Files\\Zope-2.7.6-final\\Extensions\\proxyModule.py', 'proxyModule') Module C:\Program Files\Zope-2.7.6-final\Extensions\proxyModule.py, line 18, in ? ImportError: No module named ext " Thanks in advance Leticia
Am Sonntag, den 05.06.2005, 16:39 -0400 schrieb Leticia Larrosa:
Hi: I installed the "PyXml" package, and appear in the "c:\Python24\Lib \site-packages" folder and i want to import a module of that library from an external method: "import xml.dom.ext" But i can't import from an external method any of the modules that are in the "Lib\site-packages" folder of my python instalation. Why can't import them? By default an external method have acces to modules that are in "Lib \site-packages" of a Python installation? I use Zope 2.7.6 for windows and Python2.4 ("c:\Python24\Lib\site-packages" !) The error that i get is: ...
Zope on windows is packaged with own and right version of python, which is 2.3 for all current Zopes. So you need to use the package for python 2.3 and not 2.4. Next, since zope has own python, you either copy the module to zopes python or change startzope.bat to refer to your installed python2.3. You cannot just point to or use 2.4, since zopes extension classes are compiled for 2.3.
participants (2)
-
Leticia Larrosa -
Tino Wildenhain