[Zope] How to access the namespace of a Python Script?

Elena Schulz elena.schulz at gmx.net
Tue Sep 30 10:21:48 EDT 2003


Hi,

I try to do the following inside a python script:

myDict={'myKey':'myVal'}
myString='myDict'

myObject = getattr(thisScriptNameSpace, myString)

What should I write for 'thisScriptNameSpace' to get 'myObject' pointing to
'myDict'?
In a 'normal' Python-Modul 'thisScriptNameSpace' should be 'self'.
It should be possible in a Python Script, ins't it?

-- Any hints are welcome, Elena





More information about the Zope mailing list