Re: Determining __name__ from the code that called a function

2009-07-28 Thread Gabriel Genellina
En Tue, 28 Jul 2009 03:21:10 -0300, Paul Johnston escribió: In ToscaWidgets 2 experimental, when defining resources you often do something like this: CSSLink(modname=__name__, filename='static/mycss.css') Now, what I'd like to do is make the "modname=__name__" optional, to make code more con

Determining __name__ from the code that called a function

2009-07-27 Thread Paul Johnston
Hi, In ToscaWidgets 2 experimental, when defining resources you often do something like this: CSSLink(modname=__name__, filename='static/mycss.css') Now, what I'd like to do is make the "modname=__name__" optional, to make code more concise. I figure there must be some way (using inspect or somet