CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 addFilesWithFork(), spf::SherpackFetcher.CopyFile(), ExternalLHEProducer.executeScript(), edm::storage::StormStorageMaker.getTURL(), edm::storage::StormLcgGtStorageMaker.getTURL(), TrackingRecHitProducer.produce(), TrackingRecHitProducer.setupDetIdPipes(), and edm::shared_memory::WorkerMonitorThread.startThread().

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