26 Nov
2002
26 Nov
'02
11:13 p.m.
Hi Jon,
How do I refer to the root Zope directory within a Python script?
From file system level code one could just say "context.getPhysicalRoot()", but for some reason this is not allowed inside a Script. Maybe this is due to security restrictions this people cannot mess with the Zope root if they do only have permissions for some nested folders. You could try: 1. use an External Method as a helper, which calls getPhysicalRoot() on the file system level. 2. use 'restrictedTraverse': root = container.restrictedTraverse('/') The second one is possibly the simpler way to do it. cheers, clemens