[Zope] importing libraries into zope

Dieter Maurer dieter@handshake.de
Wed, 20 Jun 2001 19:04:28 +0200 (CEST)


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