Re: Implementing "tee" in python asyncio

2023-07-27 Thread Daniel P . Berrangé
On Thu, Jul 27, 2023 at 12:49:10PM -0400, John Snow wrote: > On Thu, Jul 27, 2023, 6:47 AM Daniel P. Berrangé > wrote: > > > On Wed, Jul 26, 2023 at 04:25:34PM -0400, John Snow wrote: > > > Hi folks, > > > > > > I'm currently wondering how to take a StreamReader as found on > > > > > https://docs

Re: Implementing "tee" in python asyncio

2023-07-27 Thread John Snow
On Thu, Jul 27, 2023, 12:53 PM Daniel P. Berrangé wrote: > On Thu, Jul 27, 2023 at 12:49:10PM -0400, John Snow wrote: > > On Thu, Jul 27, 2023, 6:47 AM Daniel P. Berrangé > > wrote: > > > > > On Wed, Jul 26, 2023 at 04:25:34PM -0400, John Snow wrote: > > > > Hi folks, > > > > > > > > I'm current

Re: Implementing "tee" in python asyncio

2023-07-27 Thread John Snow
On Thu, Jul 27, 2023, 6:47 AM Daniel P. Berrangé wrote: > On Wed, Jul 26, 2023 at 04:25:34PM -0400, John Snow wrote: > > Hi folks, > > > > I'm currently wondering how to take a StreamReader as found on > > > https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process > >

Re: Implementing "tee" in python asyncio

2023-07-27 Thread Daniel P . Berrangé
On Wed, Jul 26, 2023 at 04:25:34PM -0400, John Snow wrote: > Hi folks, > > I'm currently wondering how to take a StreamReader as found on > https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process > and to consume the data while optionally re-streaming it to a > seconda

Implementing "tee" in python asyncio

2023-07-26 Thread John Snow
Hi folks, I'm currently wondering how to take a StreamReader as found on https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process and to consume the data while optionally re-streaming it to a secondary consumer. What I'd like to do is create a StreamWatcher class that