How to access an object created in another module using python
3 Answers
Yeah,
Thats right,
from module import desired_object
module exapmle:
# Desired Module:
desired_object = None
def my_func():
global desired_object
desired_object = SomeObject()
But make sure the 'my_func' must be called before importing desired_object from your module
1 Comment
Wazery
Is your code right if the desired_object was created inside a function?