call site 9 for io.StdCapture.__init__
io/test/test_stdcapture.py - line 147
139
140
141
142
143
144
145
146
147
148
149
150
   def test_callcapture_nofd(): 
       def func(x, y): 
           os.write(1, "hello")
           os.write(2, "hello")
           print x
           print >>py.std.sys.stderr, y
           return 42
      
->     res, out, err = py.io.StdCapture.call(func, 3, y=4) 
       assert res == 42 
       assert out.startswith("3") 
       assert err.startswith("4") 
io/stdcapture.py - line 16
9
10
11
12
13
14
15
16
17
18
19
20
21
   def call(cls, func, *args, **kwargs): 
       """ return a (res, out, err) tuple where
               out and err represent the output/error output
               during function execution. 
               call the given function with args/kwargs
               and capture output/error during its execution. 
           """ 
->     so = cls()
       try: 
           res = func(*args, **kwargs)
       finally: 
           out, err = so.reset()
       return res, out, err