[Zope] Namespace questions

Dieter Maurer dieter@handshake.de
Tue, 27 Feb 2001 22:33:30 +0100 (CET)


John R. Daily writes:
 > I suspect I'm merely being dense, but I'm struggling to understand how
 > Python scripts and DTML documents deal with the Zope namespace.
 > 
 > As an example, assume that I've defined a /lib/foo/bar Python script,
 > and in /tests/foo/lib/test1 I define a Python script that tests the
 > functionality in /lib/foo/bar.
 > 
 > container.lib.foo.bar works from test1 in other paths, but once 'lib'
 > pops up in the local environment, things seem to break down.
Of course!

Because, then, the local "lib" is found and it does not know about
"foo".

You might work with absolute paths and "restrictedTraverse".
Alternatively, you could try to avoid the double use of "lib".


Dieter