Globals across modules
- by Coder1
Wow, this seems so basic, but I can't get it to work. All I need to do is store a global dict which can be accessed and modified from other modules & threads.
What's the "best practices" way of achieving this?
test.py
import testmodule
class MyClassA():
def __init__(self, id):
self.id = id
if __name__ == '__main__':
global…