Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
popen2 Namespace Reference

Data Structures

class  Popen3
 
class  Popen4
 

Functions

def popen2
 
def popen3
 
def popen4
 

Variables

list __all__ = ["popen2", "popen3", "popen4"]
 
int MAXFD = 256
 
list _active = []
 

Detailed Description

Spawn a command with pipes to its stdin, stdout, and optionally stderr.

The normal os.popen(cmd, mode) call spawns a shell command and provides a
file interface to just the input or output of the process depending on
whether mode is 'r' or 'w'.  This module provides the functions popen2(cmd)
and popen3(cmd) which return two or three pipes to the spawned command.

Function Documentation

def popen2 (   cmd,
  bufsize = -1,
  mode = 't' 
)
Execute the shell command 'cmd' in a sub-process.  If 'bufsize' is
specified, it sets the buffer size for the I/O pipes.  The file objects
(child_stdout, child_stdin) are returned.

Definition at line 119 of file popen2.py.

References os.popen2().

120  def popen2(cmd, bufsize=-1, mode='t'):
121  """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is
122  specified, it sets the buffer size for the I/O pipes. The file objects
123  (child_stdout, child_stdin) are returned."""
124  w, r = os.popen2(cmd, mode, bufsize)
125  return r, w
def popen3 (   cmd,
  bufsize = -1,
  mode = 't' 
)
Execute the shell command 'cmd' in a sub-process.  If 'bufsize' is
specified, it sets the buffer size for the I/O pipes.  The file objects
(child_stdout, child_stdin, child_stderr) are returned.

Definition at line 126 of file popen2.py.

References os.popen3().

127  def popen3(cmd, bufsize=-1, mode='t'):
128  """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is
129  specified, it sets the buffer size for the I/O pipes. The file objects
130  (child_stdout, child_stdin, child_stderr) are returned."""
131  w, r, e = os.popen3(cmd, mode, bufsize)
132  return r, w, e
def popen4 (   cmd,
  bufsize = -1,
  mode = 't' 
)
Execute the shell command 'cmd' in a sub-process.  If 'bufsize' is
specified, it sets the buffer size for the I/O pipes.  The file objects
(child_stdout_stderr, child_stdin) are returned.

Definition at line 133 of file popen2.py.

References popen2(), popen3(), and os.popen4().

134  def popen4(cmd, bufsize=-1, mode='t'):
135  """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is
136  specified, it sets the buffer size for the I/O pipes. The file objects
137  (child_stdout_stderr, child_stdin) are returned."""
138  w, r = os.popen4(cmd, mode, bufsize)
139  return r, w
else:

Variable Documentation

list __all__ = ["popen2", "popen3", "popen4"]

Definition at line 13 of file popen2.py.

list _active = []

Definition at line 17 of file popen2.py.

int MAXFD = 256

Definition at line 15 of file popen2.py.