Then, in your External method, try:: import inspect print inspect.stack()[1]
On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote: > I want to know the name (and path) of the _External Method_ from > inside it. What I _can_ get is the name of the DTML method. > > I want to build generic scaffolding code for functions that > conditionally redispatch as asynchronous calls (via ZASync); that > part, however, isn't a problem at all - everything works fine as long > as I use an HTTP request directly and redispatch with information from > the REQUEST. The problem is that I need a TALES expression to call the > function again (asynchronously this time), and for that I need the > ZOPE path to it. > > Ole > > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>: > > > is there a generic way to find out from Python code which method has > > > been called (in other words: find out where the current method is > > > located in the ZOPE hierarchy and what its name is)? If I call an > > > External Method via a DTML method, of course the REQUEST object > > > contains the path to the DTML method because the External Method > > > hasn't been called via HTTP. I haven't been able to figure out any > > > other way of getting this information. > > > > > I don't get it. Do you want to know the name of the DTML method from > > inside the External method? > > Perhaps I'll be able to help if you tell us more about the intention > > of this code. > > > > > Thanks in advance, > > > Ole > > > _______________________________________________ > > > 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 ) > > > > > > > -- > > Peter Bengtsson, > > work www.fry-it.com > > home www.peterbe.com > > hobby www.issuetrackerproduct.com > > > _______________________________________________ > 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 ) > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com _______________________________________________ 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 )