python-streamexpect icon indicating copy to clipboard operation
python-streamexpect copied to clipboard

Implement asyncio functionality

Open nastevens opened this issue 9 years ago • 2 comments

A general catch-all issue for integrating asyncio ideas into streamexpect. For example, integrating with asyncio.StreamReader and asyncio.StreamWriter, and providing methods for asynchronously waiting on multiple patterns/multiple streams using the asyncio.wait_for function.

nastevens avatar Jan 21 '16 18:01 nastevens

For reference (not saying this is the right way to do it), Pexpect supports yield from s.expect('...', async=True) within asyncio coroutines. The pexpect.async module is what powers that. I hope that's of some use to someone implementing this!

takluyver avatar May 19 '16 13:05 takluyver

Thanks @takluyver! I'm embarrassed to admit that I have not yet dug into async patterns as deeply as I should, so this will be a helpful guide.

As always, if anyone visiting this would like to help contribute with a PR, they are always welcome.

nastevens avatar May 20 '16 00:05 nastevens