All Questions
10 questions
0
votes
1
answer
23
views
Asyncio: read new data from process stdout without blocking monitoring task
I write asynchronous process manager, and up till now I came up with this:
import asyncio
class AsyncLocalProcessManager:
def __init__(self):
self.process = None
async def submit(...
1
vote
0
answers
167
views
What can I do to avoid ResourceWarnings relating to subprocess use in an IsolatedAsyncioTestCase?
I'm learning async in Python and have the following (simpified) test in python 3.9.7:
class TestBasics(IsolatedAsyncioTestCase):
async def test_server_basic_json(self):
# Set up a server
...
1
vote
1
answer
848
views
output the command line called by asyncio subprocess?
Extending question asked here,
Is there a way to find out what the command passed when creating a asyncio subprocess was?
Example Code :-
process = await asyncio.create_subprocess_shell(
...
0
votes
0
answers
2k
views
Run FFMPEG in an Async Subprocess then Kill after condition complete?
I am struggling to get this correct. I have a sample piece of code here:
import asyncio
import signal
import os
from subprocess import PIPE, Popen
async def recScreen():
cmd = 'ffmpeg -f gdigrab -...
0
votes
0
answers
320
views
Convert function into async function
I need to rewrite my python function so that it can be async executable.
This function is given as example:
import asyncio
from sse_starlette.sse import EventSourceResponse
async def run_command():
...
0
votes
1
answer
357
views
Execute a coroutine after asyncio server is started
I am working on a controller application that monitors and controls subprocesses which are independent python executeables.
Basically what I want is that in controller.py running an asyncio....
1
vote
2
answers
461
views
Is there an analog to `CalledProcessError` in the `asyncio` module?
Is there an analog, in the asyncio module, to the CalledProcessError exception from the subprocess module?
I would have expected there to be an analog, because the asyncio module creates the ...
1
vote
1
answer
344
views
One asyncio program to manage many others
Recently I've been experimenting with discord bots, which use asyncio. I've been in the process of making a program that controls lots of other bots, opening and closing them on the fly, but I have a ...
2
votes
1
answer
2k
views
ValueError: Separator is not found, and chunk exceed the limit
I'm running an external downloader script through asyncio.subprocess and whenever I try to download large data asyncio gives the following error:
asyncio.streams.LimitOverrunError: Separator is not ...
2
votes
2
answers
1k
views
Using SIGINT to kill a function in Python 3
Take the following code as an example:
import signal
import time
def stop(signal, frame):
print("You pressed ctrl-c")
# stop counter()
def counter():
for i in range(20):
print(i+...