BTW, I doubt this method of grabbing a ZClass via unrestrictedTraverse should make its way into a howto because the right way to do this *SHOULD* be: klass = Control_Panel.Products..Product.Class._zclass_ a = klass() But right now, it's not. For more info on unrestrictedTraverse, see http://www.zope.org/Members/michel/Projects/Interfaces/Traversal Michael Bernstein wrote:
Is there some way of instantiating a ZClass in Zope from within a Python product?
I've been trying to get access to Control_Panel.Products from within a Python product, but have so far met with no success.
Is there some way to access Zope internals such as the Control Panel from within a Python product (not an external method)?
I think this problem is interesting to warrant a How-To, so I'll write it up as one if I can figure it out.
Thanks for any insights you can offer,
Michael Bernstein.
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
-- Chris McDonough Digital Creations Publishers of Zope - http://www.zope.org