There should be nothing stopping you from using subprocess in both child.py and parent.py

I am able to run it perfectly fine. :)

Issue Debugging:

You are using python and /usr/sfw/bin/python.

  1. Is bare python pointing to the same python?
  2. Can you check by typing 'which python'?

I am sure if you did the following, it will work for you.

/usr/sfw/bin/python parent.py

Alternatively, Can you change your parent.py code to

import subprocess
subprocess.call(['python', '/usr/apps/openet/bmsystest/relAuto/variousSW/child.py','1', '2'])
Answer from pyfunc on Stack Overflow
🌐
Python
docs.python.org › 3 › library › subprocess.html
subprocess — Subprocess management
1 week ago - Source code: Lib/subprocess.py The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace seve...
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-subprocess-module
Python subprocess module - GeeksforGeeks
2 weeks ago - The subprocess module is used to run external programs or system commands from Python. It allows to execute commands, capture their output and interact with other processes. One can also send input, handle errors and check execution status.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-use-subprocess-to-run-external-programs-in-python-3
How To Use subprocess to Run External Programs in Python 3 | DigitalOcean
July 30, 2020 - The input keyword argument to subprocess.run allows you to pass data to the stdin of the subprocess. For example: import subprocess import sys result = subprocess.run( [sys.executable, "-c", "import sys; print(sys.stdin.read())"], input=b"underwater" )
🌐
W3Schools
w3schools.com › python › ref_module_subprocess.asp
Python subprocess Module
import subprocess result = subprocess.run(['echo', 'Hello from Emil'], capture_output=True, text=True) print(result.stdout) Try it Yourself »
🌐
DataCamp
datacamp.com › tutorial › python-subprocess
An Introduction to Python Subprocess: Basics and Examples | DataCamp
September 12, 2025 - The subprocess.run() method also returns a CompletedProcess object, which contains the following attributes: ... import subprocess result = subprocess.run("dir", shell=True, capture_output=True, text=True) print(result.stdout)
🌐
Better Stack
betterstack.com › community › guides › scaling-python › python-subprocess
An Introduction to Python Subprocess | Better Stack Community
With subprocess.run(), you can pass input directly from your Python code using the input parameter. This is useful when you want to avoid writing to a temporary file or when the data you want to process is already in memory. Here’s a simple example: app.py · Copied! import subprocess ·
Find elsewhere
🌐
PyPI
pypi.org › project › subprocess.run
subprocess.run · PyPI
from subprocess import run run('grep something', data=run.stdin)
      » pip install subprocess.run
    
Published   Nov 16, 2013
Version   0.0.8
🌐
Dataquest
dataquest.io › blog › python-subprocess
Python Subprocess: The Simple Beginner's Tutorial (2023)
February 19, 2025 - However, if you're having trouble finding the path to the Python executable on your machine, you can have the sys module do that for you. This module interacts very well with the subprocess, and a good use case for it is to replace the path to the executable like this: import sys result = subprocess.run([sys.executable, "-c", "print('This is a subprocess')"])
🌐
Medium
medium.com › @AlexanderObregon › how-to-use-pythons-subprocess-module-to-run-system-commands-ffdeabcb9721
How to Use Python’s subprocess Module to Run System Commands
November 12, 2024 - However, be cautious with this option, as it can expose your script to security risks if user input is passed directly into the command. import subprocess # Run a command in the shell subprocess.run("echo $HOME", shell=True)
🌐
Medium
medium.com › more-python › concurrency-in-python-part-vii-the-subprocess-module-bb54e4134eaa
Concurrency in Python, Part VII — The subprocess Module | by Mikhail Berkov | More Python | Medium
February 9, 2025 - The subprocess module is intended as a replacement for the old os.system (and os.spawn) way of executing external commands. ... This will execute the ls -l command and print its output. However, usually you will want to store the output of a command in a variable for further processing. You can accomplish this using the capture_output argument. Basically, if capture_output is True, then stdout and stderr will both be captured: import subprocess result = subprocess.run(["ls", "-l"], capture_output=True) print(result.stdout)
🌐
IONOS
ionos.com › digital guide › websites › web development › python subprocess
How to use Python subprocess to execute external commands and programs
June 27, 2025 - You will execute an external program using Python subprocess as demon­strat­ed earlier, but this time, a CompletedProcess object will be returned. We’ve pre­vi­ous­ly made the necessary ad­just­ments in a brief example, but now we’ll explore them in more detail. We will start again with our initial code, but this time we’ll modify it. import subprocess import sys result = subprocess.run([sys.executable, "-c", "print('hello')"], capture_output=True, text=True) print("The standard output is:", result.stdout) print("This is the standard error:", result.stderr)python
🌐
Python Module of the Week
pymotw.com › 2 › subprocess
subprocess – Work with additional processes - Python Module of the Week
Setting the shell argument to a true value causes subprocess to spawn an intermediate shell process, and tell it to run the command. The default is to run the command directly. import subprocess # Command with shell expansion subprocess.call('echo $HOME', shell=True)
🌐
Python Morsels
pythonmorsels.com › running-subprocesses-in-python
Running subprocesses in Python - Python Morsels
March 6, 2025 - To run a process, we can use the subprocess module's run function: import subprocess subprocess.run(["git", "branch", "--format=%(refname:short)"])
🌐
Pythonspot
pythonspot.com › python-subprocess
Python Subprocess — Tutorial with Examples
I want to use ping operation in cmd as subprocess and store the ping statistics in the variable to use them. Frank • Tue, 11 Jul 2017 · Hi Rehman, you can store the entire output like this: #!/usr/bin/env python import subprocess s = subprocess.check_output(["ping", "-c 1", "google.com"]) print("s = " + str(s)) Python 3 returns this as bytes, so we convert it to string with the function decode.
🌐
Real Python
realpython.com › ref › stdlib › subprocess
subprocess | Python Standard Library – Real Python
The Python subprocess module allows you to spawn new processes, connect to their input, output, and error pipes, and obtain their return codes. It’s a powerful tool for running and controlling external programs within a Python script. ... >>> import subprocess >>> result = subprocess.run( ...
🌐
Real Python
realpython.com › python-subprocess
The subprocess Module: Wrapping Programs With Python – Real Python
January 18, 2025 - In this section, you’ll cover basic use of the shell with subprocess in a Windows environment. To run a shell command using run(), the args should contain the shell that you want to use, the flag to indicate that you want it to run a specific command, and the command that you’re passing in: ... >>> import subprocess >>> subprocess.run(["pwsh", "-Command", "ls C:\RealPython"]) Directory: C:\RealPython Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 09/05/22 10:41 237 basics.py -a--- 18/05/22 17:28 486 hello_world.py CompletedProcess(args=['pwsh', '-Command', 'ls'], returncode=0)
🌐
Codecademy
codecademy.com › article › python-subprocess-tutorial-master-run-and-popen-commands-with-examples
Python Subprocess Tutorial: Master run() and Popen() Commands (with Examples) | Codecademy
The subprocess.run() function is ... later. Example 3: Capturing output and errors separately · Run a command and separately capture both its output and errors: import subprocess ·...
🌐
Simplilearn
simplilearn.com › home › resources › software development › python subprocess: master external command execution
Python Subprocess: Master External Command Execution
December 15, 2025 - Learn about Python's subprocess module for executing external commands. Discover how to manage processes and handle inputs/outputs efficiently.
Address   5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States