Re: Do subprocess.PIPE and subprocess.STDOUT sametime

2023-05-12 Thread Horst Koiner
Using asyncio for this is a good possibility I was not aware of. My best try with asyncio was: import asyncio async def run_command(): # Create subprocess process = await asyncio.create_subprocess_exec( './test.sh', stdout=asyncio.subprocess.PIPE, # Redirect stdout to a p

Do subprocess.PIPE and subprocess.STDOUT sametime

2023-05-09 Thread Horst Koiner
Hi @all, i'm running a program which is still in development with subprocess.run (Python version 3.10), further i need to capture the output of the program in a python variable. The program itself runs about 2 minutes, but it can also freeze in case of new bugs. For production i run the program