Skip to content

Terminal Auto-Detection for Carriage Return Support #1733

Description

@Kobiwizards

Why: The TODO comments in the codebase show there are known issues with certain terminals (cloud consoles, Docker, some IDEs) that don't support \r properly, causing multiple lines instead of one progress bar.

Description:
Some environments (AWS CloudWatch, certain CI logs, K8s logs) don't properly handle carriage returns. Users currently have to set TQDM_POSITION=-1 manually. tqdm should auto-detect problematic environments and fall back to a mode that works.

Example use case:

python

Should automatically detect cloud console and adjust behavior

for i in tqdm(range(1000)):
process(i) # Works in any terminal without manual config

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions