Skip to content

echo_via_pager not working as expected with generators #2542

Description

@alia5gar

This issue tracker is a tool to address bugs in Click itself. Please use
Pallets Discord or Stack Overflow for questions about your own code.

echo_via_pager not working as expected with generators

import time def count(): for i in range(10) time.sleep(1) yield "\ncount {i}"

Expected: The output should be printed one by one
Original: The output is printed in one shot, and the screen is blank for about 10 seconds

Environment:

  • Python version: 3.10
  • Click version: 8.1.3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    parsingParsing, parameters, commands, chaining, context

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions