[Zope] Creating python script from python

Mark Gibson mark@dimensional.com
Tue, 20 Aug 2002 14:24:17 -0600


I've built a python product that creates a python script in the zodb. 
This seems to work, the script appears int the zmi where I expect it to, 
and looks like I expect it to.

The problem is, it doesn't work.  When I try to use the python script, 
I get the following error:

Error Type: NameError
Error Value: global name '_' is not defined

I'll spare you the traceback.  Suffice to say this occurs in the newly 
created python script.

When I view the bindings on the script, the '_' appears appropriately in 
the Namespace field.  If I now hit 'Save Changes' in the bindings 
screen, the problem goes away; no complaints about the '_'.

Does anyone have any idea why this would happen?  Any idea how I can get 
the script to work without following this procedure?

Again, I don't make any changes to the bindings, I simply hit 'Save 
Changes' button.

Thanks,
Mark