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 - Example: In this example, a process is started and its output is captured. ... import subprocess process = subprocess.Popen( ["python", "--version"], stdout=subprocess.PIPE, text=True ) output, _ = process.communicate() print(output)
🌐
W3Schools
w3schools.com › python › ref_module_subprocess.asp
Python subprocess Module
Python Examples Python Compiler ... Training ... import subprocess result = subprocess.run(['echo', 'Hello from Emil'], capture_output=True, text=True) print(result.stdout) Try it Yourself »...
🌐
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 - As an example, this pattern could ... to have an exception raised if the external program returns a non-zero exit code: import subprocess import sys result = subprocess.run([sys.executable, "-c", "raise ValueError('oops')"],...
🌐
DataCamp
datacamp.com › tutorial › python-subprocess
An Introduction to Python Subprocess: Basics and Examples | DataCamp
September 12, 2025 - You can use the subprocess.run() ... the ls command and captures its output in the result variable: import subprocess result = subprocess.run(["ls"], stdout=subprocess.PIPE) print(result.stdout.decode())...
🌐
Better Stack
betterstack.com › community › guides › scaling-python › python-subprocess
An Introduction to Python Subprocess | Better Stack Community
For example, maybe you're listing files, checking a process status, or parsing command-line output for further logic. Python’s subprocess.run() makes this easy with the capture_output parameter, which tells Python to store the command’s ...
🌐
Dataquest
dataquest.io › blog › python-subprocess
Python Subprocess: The Simple Beginner's Tutorial (2023)
February 19, 2025 - 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')"])
Find elsewhere
🌐
Python Module of the Week
pymotw.com › 2 › subprocess
subprocess – Work with additional processes - Python Module of the Week
That means, for example, it will be difficult to cause them to terminate by sending SIGINT or SIGTERM. import os import signal import subprocess import tempfile import time import sys script = '''#!/bin/sh echo "Shell script in process $$" set -x python signal_child.py ''' script_file = tempfile.NamedTemporaryFile('wt') script_file.write(script) script_file.flush() proc = subprocess.Popen(['sh', script_file.name], close_fds=True) print 'PARENT : Pausing before sending signal to child %s...' % proc.pid sys.stdout.flush() time.sleep(1) print 'PARENT : Signaling child %s' % proc.pid sys.stdout.flush() os.kill(proc.pid, signal.SIGUSR1) time.sleep(3)
🌐
Linux find Examples
queirozf.com › entries › python-3-subprocess-examples
Python 3 Subprocess Examples
November 26, 2022 - As in the call() example, shell=True, the command string is interpreted as a raw shell command. Again, Using shell=True may expose you to code injection if you use user input to build the command string. import subprocess cp = subprocess.run(["ls -lha"],shell=True) cp # CompletedProcess(args=['ls ...
🌐
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
We execute an external Python script named my_python_file.py in this example. The content inside the my_python_file.py will be: print("This is the output from subprocess module") Copy to clipboard · Copy to clipboard · Content inside the main script file: import subprocess ·
🌐
IONOS
ionos.com › digital guide › websites › web development › python subprocess
How to use Python subprocess to execute external commands and programs
June 27, 2025 - 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:", ...
🌐
Real Python
realpython.com › python-subprocess
The subprocess Module: Wrapping Programs With Python – Real Python
January 18, 2025 - Once you have the timer.py program ready, open a Python interactive session and call the timer with subprocess: ... >>> import subprocess >>> subprocess.run(["python", "timer.py", "5"]) Starting timer of 5 seconds .....Done!
🌐
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 - The following example runs the ls -l command on a Unix-like system to list files in the current directory with detailed information: import subprocess # Run a simple shell command and capture the output result = subprocess.run(["ls", "-l"], ...
🌐
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)"])
🌐
Real Python
realpython.com › ref › stdlib › subprocess
subprocess | Python Standard Library – Real Python
Generated HTML: <h1 id="hello-world">Hello, World!</h1> <p>This is a <em>Markdown</em> file.</p> In this example, you use the subprocess module to automate the Markdown-to-HTML conversion process and handle any errors that might occur.
🌐
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 - import subprocess result = subprocess.run(['ls', '-l'], capture_output=True, text=True) print(result.stdout) While subprocess.run is great for simple use cases, subprocess.Popen gives you more control over process execution.
🌐
Python
docs.python.org › 3 › library › asyncio-subprocess.html
Subprocesses — Python 3.14.4 documentation
February 23, 2026 - The subprocess is created by the create_subprocess_exec() function: import asyncio import sys async def get_date(): code = 'import datetime as dt; print(dt.datetime.now())' # Create the subprocess; redirect the standard output # into a pipe.
🌐
Stackify
stackify.com › a-guide-to-python-subprocess
A Guide to Python Subprocess - Stackify
January 21, 2025 - import subprocess def backup_directory(source, destination, exclude=None): """ Backup a directory using rsync with error handling and logging.