RE: [Zope] Accessing self in External Methods
When you say the file object is an attribute of your ZClass, what do you mean. What superclasses are you using? Are you getting a NameError? For your last question, have you tried getting self.__class__ in your external method to access the class; I don't know if this will accomplish what you are looking to do, but it seems worth a try? Sean -----Original Message----- From: ratem@censa.com.br [mailto:ratem@censa.com.br] Sent: Friday, August 30, 2002 10:28 AM To: zope@zope.org Subject: [Zope] Accessing self in External Methods Hi, I am using an external method to call wvWare and catalog a M$-Word file content. The file object is an attribute of my ZClass. The external method is called by a Python Script (PrincipiaSearchSource). I´d like to know how can I access the file atribute from the external method. I tryed directly: self.file, but it didn´t work. Does that mean ZClasses atributes are always private? How can I get this file object? Using getattr? One more question: how can I modify a class attribute inside the External Method? thanks, Rogerio _______________________________________________ Zope maillist - Zope@zope.org 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 )
When you say the file object is an attribute of your ZClass, what do you mean. What superclasses are you using?
Basically File, CatalogAware
Are you getting a NameError?
No. it simply does nothing.
For your last question, have you tried getting self.__class__ in your external method to access the class; I don't know if this will accomplish what you are looking to do, but it seems worth a try?
I will try this also. thanks a lot, Rogerio
participants (2)
-
ratem@censa.com.br -
sean.upton@uniontrib.com