MCPcopy Create free account
hub / github.com/ActiveState/code / Start

Method Start

recipes/Python/579132_Print_Hook/recipe-579132.py:21–32  ·  view source on GitHub ↗
(self,func=None)

Source from the content-addressed store, hash-verified

19 return 0,0,text
20
21 def Start(self,func=None):
22 if self.out:
23 sys.stdout = self
24 self.origOut = sys.__stdout__
25 else:
26 sys.stderr= self
27 self.origOut = sys.__stderr__
28
29 if func:
30 self.func = func
31 else:
32 self.func = self.TestHook
33
34 #Stop will stop routing of print statements thru this class
35 def Stop(self):

Callers 4

OnInitMethod · 0.45
recipe-579132.pyFile · 0.45
recipe-303062.pyFile · 0.45
SetIconTimerMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected