Re: [Zope] returning a macro from a pythonscript

2007-03-02 Thread Gaute Amundsen
On Friday 02 March 2007 11:20, Andreas Jung wrote:
 --On 2. März 2007 11:10:57 +0100 Gaute Amundsen [EMAIL PROTECTED] wrote:
  I have tried many varieties, but I can't remember ever getting it to
  work...
 
  A few googles shows me nothing either.

 returning a macro?

 -aj

Something like this:

foo = restrictedTraverse('/foo/bar/index.html/macros/mymacro')
return foo()

But of course foo is a list, and I can't see a way I can use any of the 
contents..

G.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] returning a macro from a pythonscript

2007-03-02 Thread jerome prudent

What do you want to do with your macro?

2007/3/2, Gaute Amundsen [EMAIL PROTECTED]:


On Friday 02 March 2007 11:20, Andreas Jung wrote:
 --On 2. März 2007 11:10:57 +0100 Gaute Amundsen [EMAIL PROTECTED] wrote:
  I have tried many varieties, but I can't remember ever getting it to
  work...
 
  A few googles shows me nothing either.

 returning a macro?

 -aj

Something like this:

foo = restrictedTraverse('/foo/bar/index.html/macros/mymacro')
return foo()

But of course foo is a list, and I can't see a way I can use any of the
contents..

G.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )





--
J. Prudent
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )