| Trees | Indices | Help |
|
|---|
|
|
1 # $Id: demo.py 997 2009-02-25 06:12:43Z glandrum $ 2 # 3 # Copyright (c) 2001-2006, Greg Landrum and Rational Discovery LLC, 4 # 5 # @@ All Rights Reserved @@ 6 # 7 8 # Demo code for the Logger class 9 import Logger 10 2325 l = Logger.Logger(Foo,7) 26 l.method1(1,2) 27 l.method1(1,2,c='grm') 28 l.method2() 29 l.method1(7,6,'pizza') 30 l.b = 3 31 l.method2() 32 33 print l._LoggerGetLog() 34 35 f = Foo(6) 36 r = Logger.replay(l._LoggerGetLog(),f) 37 print 'playback results:',r 38 # f is now in more or less the same state as l... the only differences 39 # will arise because of different arguments passed to the underlying 40 # classes __init__ method 41 print f.b4244 # create a Logger which will flush itself: 45 l = Logger.Logger(Foo,7,loggerFlushCommand='method2') 46 l.method1(23,42) 47 l.method1(1,2,'foo') 48 print l._LoggerGetLog() 49 # this will blow out the log 50 l.method2() 51 print l._LoggerGetLog()52 53 if __name__ == '__main__': 54 demo1() 55 demo2() 56
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Apr 3 06:05:40 2009 | http://epydoc.sourceforge.net |