Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async read? #31

Open
davidbrochart opened this issue Mar 23, 2022 · 1 comment
Open

Async read? #31

davidbrochart opened this issue Mar 23, 2022 · 1 comment
Assignees
Milestone

Comments

@davidbrochart
Copy link

I'd like to use the read() method of PyWinpty's PTY process with asyncio, e.g.:

import asyncio
from winpty import PTY

cols, rows = 80, 25
process = PTY(cols, rows)

process.spawn('C:\windows\system32\cmd.exe')

async def main():
    txt = await process.read()
    print(txt)

asyncio.run(main())

Do you think it could be possible to implement that in this library?

@andfoy
Copy link
Owner

andfoy commented Mar 28, 2022

Hi @davidbrochart, thanks for proposing this use case, we'll see how to implement asynchronous communication

@andfoy andfoy self-assigned this Mar 28, 2022
@andfoy andfoy added this to the v0.4.0 milestone Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants