Python lowlevel
From wikinotes
Objects by Memory Location
WARNING:
Kills python process if there is an error. (including maya).
import ctypes memoryLoc = id( MyClassInstance ) ## Get Memory Location ref2Class = ctypes.cast( memoryLoc, ctypes.py_object ).value ## Retrieve Object from Memory Location