Hannes Grund writes:
 > I have an external Method 
 > which creates dynamically an instance from of a class depending on 
 > some input to a function contained in this method.
 > In short the code (of the external method)
 > 
 > class Classname:
 > ....
 > Called from Zope this does not work. The pickle module raises an 
 > error: 

The External Method documentation tells you that you may
not define a class inside the the source file and return
instances thereof into the Zope world.

Place such classes in standard Python module files
(the documentation suggests a subpackage in "Shared")
and import them in your external method source file.

 > QUESTION 3: The lifetime of an instance has should not to be longer than 
 > the current REQUEST is performed,  is there any possibility to
 > create the instance as an subobject of the current REQUEST ?? 
self.REQUEST.set('xxx', <your instance>)


Dieter

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to