Skip to content

Output blocks after 65k lines when using run_in_terminal #835

Open
@jeroen-dhollander

Description

@jeroen-dhollander

Hey all,

When using run_in_terminal, the output will block forever after printing 65536 lines.
This is using the latest prompt_toolkit version (2.0.8), and python 3.

To reproduce simply run the this_blocks_after_65k_lines method:

def this_blocks_after_65k_lines():
    i = 0
    while True:
        run_in_terminal(lambda: print_formatted_text(FormattedText([('', f'{i}')])))
        i = i + 1

def this_does_not_block():
    i = 0
    while True:
        print_formatted_text(FormattedText([('', f'{i}')]))
        i = i + 1

The output will keep scrolling numbers until 65536, then it stops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions