Skip to content

echo_via_pager not working as expected with generators #2542

@alia5gar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions