interp is an interpreter object to use. By default a new one is created. request_refresh is a function that will be called each time the running code asks for a refresh - to, for example, update the screen.
(self, interp=None, request_refresh=lambda: None)
| 84 | """ |
| 85 | |
| 86 | def __init__(self, interp=None, request_refresh=lambda: None): |
| 87 | """ |
| 88 | interp is an interpreter object to use. By default a new one is |
| 89 | created. |
| 90 | |
| 91 | request_refresh is a function that will be called each time the running |
| 92 | code asks for a refresh - to, for example, update the screen. |
| 93 | """ |
| 94 | self.interp = interp or code.InteractiveInterpreter() |
| 95 | self.source = None |
| 96 | self.main_context = greenlet.getcurrent() |
| 97 | self.code_context = None |
| 98 | self.request_refresh = request_refresh |
| 99 | # waiting for response from main thread |
| 100 | self.code_is_waiting = False |
| 101 | # sigint happened while in main thread |
| 102 | self.sigint_happened_in_main_context = False |
| 103 | self.orig_sigint_handler = None |
| 104 | |
| 105 | @property |
| 106 | def running(self): |
nothing calls this directly
no outgoing calls
no test coverage detected