CMS 3D CMS Logo

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 evf::FUEventProcessor::FUEventProcessor(), DQMProvInfo::getShowTags(), StormLcgGtStorageMaker::getTURL(), and StormStorageMaker::getTURL().

00006                                :
00007   """
00008   wrapper around subprocess to simplify te interface
00009   """
00010   args = _shlex.split(cmdline)
00011   if input is not None:
00012     command = _subprocess.Popen(args, stdin = _subprocess.PIPE, stdout = _subprocess.PIPE, stderr = None)
00013   else:
00014     command = _subprocess.Popen(args, stdin = None, stdout = _subprocess.PIPE, stderr = None)
00015   (out, err) = command.communicate(input)
00016   return out