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:
Related: #2542 ☹️
I would love to see text immediately in this toy example:
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
Related: #2542☹️