Python Forum
builing a long variable-length command-pipeline
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
builing a long variable-length command-pipeline
#7
can you show how to connect TWO commands with that built-in PIPE in subprocess?  can you then expand that to N commands from a list of commands?

btw, the .communicate() method is bad in some cases because it waits for the command to complete before you get any data.  using this in a pipeline would preclude parallel execution of the commands.
Tradition is peer pressure from dead people

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


Messages In This Thread
RE: builing a long variable-length command-pipeline - by Skaperen - Dec-14-2017, 02:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to write a part of powershell command as a variable? ilknurg 2 1,234 Jul-26-2022, 11:31 AM
Last Post: ilknurg
  Os command output in variable shows wrong value paulo79 2 1,637 Apr-09-2022, 03:48 PM
Last Post: ndc85430
  How to use a variable in linux command in python code? ilknurg 2 1,714 Mar-14-2022, 07:21 AM
Last Post: ndc85430
  Command output to Variable ironclaw 1 1,872 Aug-26-2021, 06:55 PM
Last Post: bowlofred
  Correct syntax for a variable inside a quotes: MP4Box command JonnyDriller 2 2,895 Feb-02-2020, 01:22 AM
Last Post: JonnyDriller
  Long command with characters not working in Python on Oracle Linux 7 iaas_infra 10 6,524 Jul-19-2019, 04:53 PM
Last Post: ichabod801
  Insert a variable in a Python > Cellular AT command ElectronicsNut 1 2,236 Jul-07-2019, 02:26 PM
Last Post: joe_momma
  pipeline between 2 programs Skaperen 11 6,122 Jul-02-2018, 10:48 PM
Last Post: Skaperen
  search and store a value from linux command output in to variable python prazy29 1 3,395 Apr-06-2018, 01:56 PM
Last Post: wavic
  [subprocess]>Run a cmd command and get output into a variable CSA75 4 23,122 Mar-13-2017, 09:33 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

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