Dec-24-2016, 06:49 AM
i will name this pcall() or pipeline() or callpipe() or something along those lines.
it will use one positional argument, a list of lists, where each lower level list is a command like is given to subprocess.call(). this function will put the list of commands together in a pipeline with optional argument stdin= being an input going to the first command, and stdout= being used as the output for output for the last command, and stderr= being used for all the commands as their stderr conjoined output.
this is needed for my goal of translating (as many as possible of) my many bash and a few tcsh scripts to python. this function must work in python 3 and hopefully also in python 2 (preferably the same code).
it will use one positional argument, a list of lists, where each lower level list is a command like is given to subprocess.call(). this function will put the list of commands together in a pipeline with optional argument stdin= being an input going to the first command, and stdout= being used as the output for output for the last command, and stderr= being used for all the commands as their stderr conjoined output.
this is needed for my goal of translating (as many as possible of) my many bash and a few tcsh scripts to python. this function must work in python 3 and hopefully also in python 2 (preferably the same code).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.