Given a class C in Python, how can I determine which file the class was defined in? I need something that can work from either the class C, or from an instance off C.
try:
import sys, os os.path.abspath(sys.modules[LocationArtifact.__module__].__file__)