Answer the question
In order to leave comments, you need to log in
Is it possible to find out which application called the method?
There is a method that should work differently depending on which application called it.
Can this be done somehow?
Answer the question
In order to leave comments, you need to log in
You can use reflection:
import inspect
caller = inspect.stack()[1][3]
# или
curframe = inspect.currentframe()
calframe = inspect.getouterframes(curframe, 2)
caller = calframe[1][3]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question