1 import sys
, time
, os
.path
, StringIO
5 mode
= int(sys
.argv
[1])
8 log2
= open("log2.out", "wt")
9 log3
= open("log3.out", "wt")
11 # delete the logfiles first, and wait a moment to exercise a failure path
12 if os
.path
.exists("log2.out"):
14 if os
.path
.exists("log3.out"):
17 log2
= open("log2.out", "wt")
18 log3
= open("log3.out", "wt")
20 # don't create the logfiles at all
21 log2
= StringIO
.StringIO()
22 log3
= StringIO
.StringIO()
25 log2
.write("this is log2 %d\n" % i
)
27 log3
.write("this is log3 %d\n" % i
)
29 sys
.stdout
.write("this is stdout %d\n" % i
)