importing libraries into zope
I'm trying to import a Python module into a Python script in Zope. It continually gives me the error: "Error Type: ImportError Error Value: import of "emUU" is unauthorized" (emUU is the module) I found this example of how to properly import modules by searching the list's archives (thanks, Google!): http://lists.zope.org/pipermail/zope-dev/2001-February/009531.html However, when I try it, Zope complains about using "_" as the first character of a variable. I'm sure there is something simple I'm not doing first, but can't figure out what it is. Any pointers? TIA. Cory __________________________________________________ Do You Yahoo!? Spot the hottest trends in music, movies, and more. http://buzz.yahoo.com/
Corbett Waddingham writes:
I'm trying to import a Python module into a Python script in Zope. It continually gives me the error: "Error Type: ImportError Error Value: import of "emUU" is unauthorized" (emUU is the module)
I found this example of how to properly import modules by searching the list's archives (thanks, Google!): http://lists.zope.org/pipermail/zope-dev/2001-February/009531.html Thus, you solved your first problem? The module is imported?
However, when I try it, Zope complains about using "_" as the first character of a variable. I'm sure there is something simple I'm not doing first, but can't figure out what it is. Any pointers? All names starting with "_" (2 exceptions) are considered private in a restricted execution context (DTML, Python Scripts).
I would not expect that such names inside your imported module would make a problem, but certainly, you could not use such names in your Python Script. Dieter
participants (2)
-
Corbett Waddingham -
Dieter Maurer