[Solved] Is there a way to access a variable from a calling function in python?
So after a while of back and forth I have finally found a solution to my issue. As Matthias suggested I use global to find the object, i decided to use inspect to add it myself like so: Assigning def __enter__(self): inspect.stack()[1][0].f_globals[“_ExampleName”] = self Retrieving (Fixed) @staticmethod def _find_example(): stack = inspect.stack() for stack_index in … Read more