How can I find out what file is importing a particular file in python?
Consider the following example:
#a.py import cmn .... #b.py import cmn ... #
You'd need to install an import hook that tracks all imports. See PEP 302 and http://docs.python.org/dev/py3k/library/importlib.html. However, as the comments above point out, there is probably a better way to structure your code.