--- Stephen R Laniel <[EMAIL PROTECTED]> wrote:

> On Mon, Jun 25, 2007 at 06:27:29PM -0700, Matthew Peter wrote:
> > For example, how do I get this to work?
> > 
> > def func():
> >     print "This is", __?__
> >     return __caller__
> > 
> > def echo():
> >     print "This is ", __?__
> >     return func()
> 
> inspect is your friend:
> http://docs.python.org/lib/inspect-stack.html
> 
> -- 
> Stephen R. Laniel
> [EMAIL PROTECTED]
> Cell: +(617) 308-5571
> http://laniels.org/
> PGP key: http://laniels.org/slaniel.key
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


--- Stephen R Laniel <[EMAIL PROTECTED]> wrote:

> On Mon, Jun 25, 2007 at 06:27:29PM -0700, Matthew Peter wrote:
> > For example, how do I get this to work?
> > 
> > def func():
> >     print "This is", __?__
> >     return __caller__
> > 
> > def echo():
> >     print "This is ", __?__
> >     return func()
> 
> inspect is your friend:
> http://docs.python.org/lib/inspect-stack.html
> 
> -- 
> Stephen R. Laniel
> [EMAIL PROTECTED]
> Cell: +(617) 308-5571
> http://laniels.org/
> PGP key: http://laniels.org/slaniel.key
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


Parsing the stack's tuple to get those attributes didn't feel reliable or 
pythonic.
I am likely overlooking something. Is there a brief example you could show me 
in the
context of using inspect to accomplish the goal I outlined above? The goal is 
using
a function and not a class. Thanks!


       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to