Discussion Overview
The discussion revolves around methods to run multiple bash scripts simultaneously from a Python script, focusing on subprocess management and terminal interaction. Participants explore various approaches and potential issues related to output handling.
Discussion Character
- Technical explanation
- Debate/contested
- Mathematical reasoning
Main Points Raised
- One participant questions whether using subprocess.call will execute run1.sh and then run2.sh sequentially, suggesting that this approach does not allow for simultaneous execution.
- Another participant confirms that subprocess.call will indeed run the scripts sequentially and suggests using subprocess.Popen for non-blocking execution.
- A different approach is proposed where a Python script generates a bash script that runs multiple scripts in parallel using "&" to allow for simultaneous execution.
- One participant describes a method using subprocess.Popen to run scripts sequentially, waiting for each to finish before starting the next.
- Concerns are raised about issues with scripts that generate output, leading to potential freezing when reading back the output.
- Another participant reiterates the output handling issue, referencing the Python documentation on subprocess for potential pitfalls.
- One participant acknowledges the output issue to ensure the original poster is aware of the complications that may arise when spawning processes that generate terminal output.
Areas of Agreement / Disagreement
Participants do not reach a consensus on the best method for running scripts simultaneously, with multiple competing views and approaches presented throughout the discussion.
Contextual Notes
Participants express concerns about the limitations of subprocess management, particularly regarding output handling and terminal interaction, which remain unresolved.