CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
pipe Namespace Reference

Functions

def pipe
 

Function Documentation

def pipe.pipe (   cmdline,
  input = None 
)
wrapper around subprocess to simplify te interface

Definition at line 5 of file pipe.py.

Referenced by ExternalLHEProducer.executeScript(), edm::EventProcessor.forkProcess(), DQMProvInfo.getShowTags(), StormStorageMaker.getTURL(), and StormLcgGtStorageMaker.getTURL().

5 
6 def pipe(cmdline, input = None):
7  """
8  wrapper around subprocess to simplify te interface
9  """
10  args = _shlex.split(cmdline)
11  if input is not None:
12  command = _subprocess.Popen(args, stdin = _subprocess.PIPE, stdout = _subprocess.PIPE, stderr = None)
13  else:
14  command = _subprocess.Popen(args, stdin = None, stdout = _subprocess.PIPE, stderr = None)
15  (out, err) = command.communicate(input)
16  return out
def pipe
Definition: pipe.py:5