Greetings, I'm using SQLObject 0.6 and Python 2.3. I'm new to SQLObject, and it's very enjoyable.
I'm trying to decide how best to set my connection object so all of my SQLObject classes can have access to it. It appears that I have three options: - Use a _connection attribute in the class definition itself - Use a module global, __connection__, in the module where the SQLObject classes live - Call setConnection() on my SQLObject classes to set their connection object once I've created it I would like to be able to set the connection object for my classes as part of my program initialization logic (i.e. not as __connection__ or _connection). I'm thinking I might write a function which, given a connection object C, will check the contents of the module where my classes live, find the SQLObject subclasses, and call setConnection(C) on them. Is this solution wacky? How does one usually go about solving this problem? Thanks! -- Jonathan Daugherty http://www.parsed.org ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
