Exemplo n.º 1
0
 def __init__(self, cmd, bufsize=1):
     strcmd = _get_str(cmd)
     self._p = os_popen._PopenCmd(strcmd, "w", bufsize, shared_eo=True)
     self._p.run()
     self.tochild = self._p.chinw
     self.fromchild = self._p.choutr
     self.childerr = None
     self.pid = self._p.worker.job_id
Exemplo n.º 2
0
	def __init__(self, cmd, bufsize=1):
		strcmd = _get_str(cmd)
		self._p = os_popen._PopenCmd(strcmd, "w", bufsize, shared_eo=True)
		self._p.run()
		self.tochild = self._p.chinw
		self.fromchild = self._p.choutr
		self.childerr = None
		self.pid = self._p.worker.job_id
Exemplo n.º 3
0
 def __init__(self, cmd, capture_stderr=False, bufsize=0):
     strcmd = _get_str(cmd)
     self._p = os_popen._PopenCmd(strcmd, "w", bufsize, shared_eo=False)
     self._p.run()
     self.tochild = self._p.chinw
     self.fromchild = self._p.choutr
     if capture_stderr:
         self.childerr = self._p.cherrr
     else:
         self.childerr = None
     self.pid = self._p.worker.job_id
Exemplo n.º 4
0
	def __init__(self, cmd, capture_stderr=False, bufsize=0):
		strcmd = _get_str(cmd)
		self._p = os_popen._PopenCmd(strcmd, "w", bufsize, shared_eo=False)
		self._p.run()
		self.tochild = self._p.chinw
		self.fromchild = self._p.choutr
		if capture_stderr:
			self.childerr = self._p.cherrr
		else:
			self.childerr = None
		self.pid = self._p.worker.job_id
Exemplo n.º 5
0
def popen2(cmd, bufsize=0, mode="t"):
    """Executes cmd as a sub-process. Returns the file objects (child_stdout, child_stdin)."""
    command = _get_str(cmd)
    i, o = os_popen.popen2(None, command, mode, bufsize)
    return o, i
Exemplo n.º 6
0
def popen2(cmd, bufsize=0, mode="t"):
	"""Executes cmd as a sub-process. Returns the file objects (child_stdout, child_stdin)."""
	command = _get_str(cmd)
	i, o = os_popen.popen2(None, command, mode, bufsize)
	return o, i