[Zope] Calling DTML Document from python script

Laurent Duchesne laurent@levinux.org
Tue, 18 Sep 2001 10:06:53 -0400


You got the problem right and I thank you for that.
Now the only thing is that it also print out the header and the footer so it 
looks a little crazy ;)
The way I see it, I could read the data, remove the header/footer tag with 
regular expression, write to a temp DTML document and print it.

Is there a better way to do that?

	Laurent

Le Mardi 18 Septembre 2001 09:55, Oleg Broytmann a écrit :
> On Tue, Sep 18, 2001 at 09:51:00AM -0400, Laurent Duchesne wrote:
> > I got an object 'file' witch contains a DTML Document object.
> > When I try to call it from a pythton script like this :
> > 	print file()
> > I get the error :
> > 	Error Type: KeyError
> > 	Error Value: standard_html_header
>
>    Every DTML object requires context and REQUEST, so try something like
> this: print file(context, context.REQUEST)
>
> Oleg.
> ----
>      Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
>            Programmers don't die, they just GOSUB without RETURN.
>
> _______________________________________________
> 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 )