with open('shared_id', 'w') as f:
    f.write(str(mm_addr))
pid = os.fork()
if pid == 0:
    id_from_file = int(open('shared_id').read())
loaded_mm = ctypes.cast(id_from_file, ctypes.py_object).value
loaded_mm.seek(0)
print(loaded_mm.readline())
loaded_mm.close()
PYTHON Making global variable accessible from every process