sharing data between modules

Bruce Edge bedge at troikanetworks.com
Fri Mar 23 10:38:09 EST 2001


As a C++ guy I tend to put each class in a different file. In python this
gives me a different module for each class. My app uses this group of
classes, ie: modules, what's the best way to share data between them?

Currently I register the classes with each other using class static data, 
so they all have a reference to each other. Ideally, I'd like to be able
to have a few globals that every module can see.  

Am I doing this the hard way?

TIA, Bruce.



More information about the Python-list mailing list