-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
I would love to see text immediately in this toy example:
import click
import os
import time
def _generator():
for i in range(10000):
time.sleep(0.01)
yield f"{i+1:07}\n"
@click.command
def main():
os.environ.setdefault("LESS", "-XFR")
click.echo_via_pager(_generator())
main()As it is currently, nothing will show until 512 lines have been yielded.
I suspect a flush after this line would do the trick:
click/src/click/_termui_impl.py
Line 468 in cdab890
| c.stdin.write(text) |
Related: #2542
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels