[Tutor] identifying the calling module/function
tetsuo2k6 at web.de
tetsuo2k6 at web.de
Fri Mar 7 14:16:26 CET 2008
Hello Tutor!
I am building a couple of scripts to manage a database for our company.
The projects name is 'dgf'. As a lot of the functionality is used in
more than one of these scripts, I moved this functionality to a module
(dgf.py). It has several functions now.
Question: Is there an easy way to determine inside dgf.py where the
function call came from?
dgf.py:
def yetanotherfunction():
"""Edit Me!"""
if <function call came from script.py>:
...
Something like that?
Regards
-paul
More information about the Tutor
mailing list