Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9175711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:57:47+00:00 2026-06-17T16:57:47+00:00

If I generate multiple subprocess.Popen([‘commands’, ‘that’, ‘I’, ‘called’]) and for each I do stdin.write(..)

  • 0

If I generate multiple subprocess.Popen(['commands', 'that', 'I', 'called']) and for each I do stdin.write(..) or p.communicate(...)to interact with the commands, is it guarantee to be independent and will come back to the each process (stdout from the called command)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:57:47+00:00Added an answer on June 17, 2026 at 4:57 pm

    If you do this:

    proc = subprocess.Popen(
        cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
    stdout, _ = proc.communicate()
    

    You will get a separate set of pipes for each process. The value subprocess.PIPE is just a special flag to tell subprocess.Popen() to create a new pipe — so the above command creates two new pipes: one pipe for stdin and a separate pipe for stdout.

    If you do this:

    proc = subprocess.Popen(cmd)
    proc.wait()
    

    The new process will share stdin, stdout, and stderr with your process (well, basically — the kernel side will be shared).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to write GLSL ES fragment shaders under iOS that generate multiple
Is there some library or generator that I can use to generate multiple templated
I want to generate the string like SEO friendly URL. I want that multiple
I have multiple WCF services that share some data contracts and need to generate
I need to generate multiple databases to SQL, so I need script/program to automatically
I am currently working on a project where I need to generate multiple values
I would like to achieve the following, I need to generate report for multiple
If multiple grouping is used, jqgrid advanced search can generate search criteria like {groupOp:AND,rules:[],groups:[{groupOp:AND,rules:[{field:Nimi,op:cn,data:kk},{field:Nimi,op:cn,data:kkk}],groups:[]}]}
The script will generate multiple files using the year and id variable. These files
Is there a way to generate multiple JAR files from a single project in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.