[Zope] python script returning DTMLMethod problem

Dieter Maurer dieter@handshake.de
Wed, 7 Aug 2002 20:08:50 +0200


Tom Germaine writes:
 > But I have a further issue in that I wish the python script to return 
 > a DTMLMethod that calls dtml-tree to display the contents of a 
 > folder. I cannot find any references to python scripts returning 
 > DTMLMethods or Documents and the suggestions following do 
 > not work, I think because of namespace problem.  
Bah, the mailing list is overfull of them...

 > >>must pass the
 > >> "positional" parameters. 
... not too bad!
 > >> you coded: 
 > >  >>>return context.avc.showFiles()
 > > >should be something like this:
 > > >return context.avc.showFiles(None,context.REQUEST)
Almost, better:

	client= context.avc
	return client.showFiles(client,context.REQUEST)


Dieter