3 import sys
, time
, os
.path
, StringIO
7 mode
= int(sys
.argv
[1])
10 log2
= open("log2.out", "wt")
11 log3
= open("log3.out", "wt")
13 # delete the logfiles first, and wait a moment to exercise a failure path
14 if os
.path
.exists("log2.out"):
16 if os
.path
.exists("log3.out"):
19 log2
= open("log2.out", "wt")
20 log3
= open("log3.out", "wt")
22 # don't create the logfiles at all
23 log2
= StringIO
.StringIO()
24 log3
= StringIO
.StringIO()
27 log2
.write("this is log2 %d\n" % i
)
29 log3
.write("this is log3 %d\n" % i
)
31 sys
.stdout
.write("this is stdout %d\n" % i
)