From: Patrick K. O'B. <po...@or...> - 2001-12-13 21:32:19
|
Looks good to me, for what it's worth. --- Patrick K. O'Brien Orbtech.com - Your Source For Python Development Services Phone: 314-963-3206 > As a simple test, I added the following code to log.py below the class > definitions, but before the unit tests. > > log = Log().getInstance() > def info(*args): log.info(*args) > > Then in the worldclock.py sample, I added > import log > and commented out the other Log code to make sure there was no > interference. > The worldclock code changed from > > self.log.info("updating image ", url) > to > log.info("updating image ", url) > > This seems to work just fine. The module defines the single > instance of the > Log class and global functions (global to the module) are defined for each > class method. The rest of the framework and any samples that want to use > logging don't care about the implementation, the syntax is simple, and no > capabilities are lost as far as I can tell except subclassing Log. > > I'm no Python language expert, so if I'm missing something, please clue me > in. > > ka > > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users |