def __init__(self, rfile, wfile, debug=False): """ Associates I/O with `rfile` and `wfile`. `debug` should only be turned on for library development. """ self._rfile = rfile self._wfile = wfile _AGI.__init__(self, debug)
def __init__(self, debug=False): """ Binds the SIGHUP signal and associates I/O with stdin/stdout. `debug` should only be turned on for library development. """ signal.signal(signal.SIGHUP, self._handle_sighup) self._rfile = sys.stdin self._wfile = sys.stdout _AGI.__init__(self, debug)