RE: [Zope] Newbie - passing a list to an External Method
[ Dylan Reinhardt]
I'm not sure if I can explain _all_ of what you're seeing here... you seem to be having a different error than you were before and I don't have any experience with the sping module.
But... do have something to recommend. Use:
def run(self, fileID, lines):
to define your external method.
The first argument passed to an external method is the "self" object, a reference to the context from which the method was called.
Aren't you mixing up Python scripts with External Methods? I have never included a 'self' parameter in any of my external methods and they work just fine. Cheers, Tom P
On Tue, 2003-04-22 at 08:43, Passin, Tom wrote:
Aren't you mixing up Python scripts with External Methods?
Nope.
I have never included a 'self' parameter in any of my external methods and they work just fine.
The "self" parameter is supposed to be optional unless you *want* to reference the calling context. http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ScriptingZope.st... I thought it might help out to catch "self" explicity because the OP was having a problem with a variable inexplicably turning out to be the wrong type with no intervening manipulation. But maybe that's grasping at straws... if so, I don't have a *good* theory on what's going wrong. Dylan
participants (2)
-
Dylan Reinhardt -
Passin, Tom