[Zope] zope and python classes
medved at fcc.net
Mon Oct 13 20:50:55 EDT 2003
If I could get the following to work, I'd have all the state maintenance I'd
I have a file called bearcl1.py with the lines:
gstr = "a wet bird never flies at night"
def setgstr( self, InputStr ):
self.gstr = InputStr
and a file called __init__.py with the lines:
from bearcl1 import bearcl1
Register base class
both saved in a subdir called:
and have created a product called bcl1 with a zclass called bzcl1 which
subclasses bearcl1 and CatalogAware.
Moreover, the class bzcl1 now shows up on my ADD list when constructing web
pages so that I can have an object called bz1 of the class bzcl1 and a dtml
page in the same folder and the dtml page contain a line like:
<dtml-var bz1.getgstr >
which looks like it ought to work ( and produce 'a wet biord never flies at
night' on the resulting page ) but doesn't.
Again, if I could get that much to work I'd basically be home free. I'd
appreciate any suggestions.
More information about the Zope