On Sat, 13 May 2023 at 07:21, Horst Koiner wrote:
>
> 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.s
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
On 5/10/23 12:51, Dieter Maurer wrote:
Horst Koiner wrote at 2023-5-9 11:13 -0700:
...
For production i run the program with stdout=subprocess.PIPE and i can fetch
than the output later. For just testing if the program works, i run with
stdout=subprocess.STDOUT and I see all program output on
Horst Koiner wrote at 2023-5-9 11:13 -0700:
> ...
>For production i run the program with stdout=subprocess.PIPE and i can fetch
>than the output later. For just testing if the program works, i run with
>stdout=subprocess.STDOUT and I see all program output on the console, but my
>program afterwa
On 5/9/23, Thomas Passin wrote:
>
> I'm not sure if this exactly fits your situation, but if you use
> subprocess with pipes, you can often get a deadlock because the stdout
> (or stderr, I suppose) pipe has a small capacity and fills up quickly
> (at least on Windows),
The pipe size is relativel
Horst Koiner ha scritto:
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 p
On 5/9/2023 2:13 PM, Horst Koiner wrote:
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
On 5/9/23 12:13, Horst Koiner wrote:
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
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