Re: [Zope] Python Script unable to response to DTML method calls

2001-01-17 Thread Evan Simpson

From: "Dirksen" <[EMAIL PROTECTED]>
> I have a python script 'func' that has 'self' as the parameter. When I
call it with:
> 
> I got this error: not enough arguments; expected 1, got 0. That means the
dtml call
> dosen't provide for the 'self' parameter as it would for other dtml
methods or python
> methods(I rewrote 'func' in python method, and things work out!)
>
> I need to call python scripts that way (for I didn't write that dtml
method), how can I
> do that or I have to write everything in python methods?

Eliminate the 'self' parameter.  Anywhere you would use 'self', use
'context' instead, or else go to the Binding tab and tell it to call the
context object 'self'.

Cheers,

Evan @ digicool & 4-am


___
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 )




[Zope] Python Script unable to response to DTML method calls

2001-01-17 Thread Dirksen

I have a python script 'func' that has 'self' as the parameter. When I call it with:

I got this error: not enough arguments; expected 1, got 0. That means the dtml call
dosen't provide for the 'self' parameter as it would for other dtml methods or python
methods(I rewrote 'func' in python method, and things work out!)

I need to call python scripts that way (for I didn't write that dtml method), how can I
do that or I have to write everything in python methods?

Dirksen

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

___
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 )