def __init__(self, suproc_command, stdin_queue, stdout_queue, parent):
threading.Thread.__init__(self)
self.setDaemon(False) # we want it to survive parent's death so it can detect innactivity and terminate subproccess
self.setName('pjon_piper_thd')
self._subproc_command = suproc_command
self._birthtime = None
self._stopped = False
self._start_failed = False
self._pipe = None
self._stdout_queue = stdout_queue
self._stdin_queue = stdin_queue
self._parent = parent
if sys.platform == 'win32':
self._startupinfo = subprocess.STARTUPINFO()
self._startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
self._startupinfo.wShowWindow = subprocess.SW_HIDE
self.log = logging.getLogger(self.name)
self.log.handlers = []
self.log.addHandler(logging.NullHandler())
#self.log.propagate = False
self.log.setLevel(logging.INFO)
评论列表
文章目录