Python Forum
another project - this one is a function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
another project - this one is a function
#1
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).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020