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

paginator: support the TextIO interface #22

Open
ioistired opened this issue Dec 20, 2018 · 1 comment
Open

paginator: support the TextIO interface #22

ioistired opened this issue Dec 20, 2018 · 1 comment
Labels
feature request a feature requested for implementation in the jishaku module or cog

Comments

@ioistired
Copy link
Contributor

ioistired commented Dec 20, 2018

Would allow doing like

out = jishaku.IOPaginator()
yield jishaku.PaginatorInterface(out)
dis.dis(some_code, file=out)

And the message would get updated as out is written to. It's up to you whether to support .seek

ioistired added a commit to ioistired/jishaku that referenced this issue Dec 20, 2018
ioistired added a commit to ioistired/jishaku that referenced this issue Dec 20, 2018
scarletcafe pushed a commit that referenced this issue Dec 23, 2018
makes the code sample in #22 a lot shorter
@scarletcafe scarletcafe added the feature request a feature requested for implementation in the jishaku module or cog label Apr 19, 2019
@scarletcafe
Copy link
Owner

Given the rewrite of how PaginatorInterfaces deal with updating themselves, this is actually closer to being possible now. Setting the send lock is possible synchronously, so as long as the impl does this and control is returned to the event loop at some point, this should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request a feature requested for implementation in the jishaku module or cog
Projects
None yet
Development

No branches or pull requests

2 participants