[Zope] using a DTMLFile in a python product method

Casey Duncan cduncan@kaivo.com
Wed, 20 Jun 2001 14:47:36 -0600


Matthew Wilbert wrote:
> 
> Casey,
> .
> Thanks for the quick response.
> 
> I tried calling it using apply, but I couldn't get the call right.  It looked like other code called something like
> 
> apply(DTMLFile(file,globals()),(),kw)
> 
> but I don't know what arguments it needs--if it works
> without arguments, I don't think I tried that.
> 
> Anyway, if that's the correct approach, I'll play around
> with it some more until I get it to work.
> 
> Thanks again,
> 
> Matt Wilbert
> mwilbert@alum.mit.edu
> 

I think it is much like calling a DTML Method, assuming it doesn't need
much of a namespace, this should work:

DTMLFile(DTMLFile, kw=kw)

You can omit the latter argument if you don't need to pass it any
keyword arguments, or pass directly as in:

DTMLFile(DTMLFile, arg1='foo', arg2='bar')
-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>