I know you can check to see if a module is being run directly, as opposed to imported, by doing:
if __name__ == '__main__':
but is there a way to check if the module that imported or called this module is the __main__ module.
So essentially instead I am looking for the second level down from the __main__ module; some way to check if the name of module that imported the current module is __main__.