Thanks to visit codestin.com
Credit goes to github.com

Skip to content

multiple tqdm progressbars in jupyter external command output do not #1672

@yarikoptic

Description

@yarikoptic

Running even the simplest tqdm script

#!/usr/bin/env python3
from tqdm import tqdm
from time import sleep

for _ in tqdm(range(2), "All", ncols = 80, position = 0):
    for _ in tqdm(range(10), "Sub", ncols = 80, position = 1, leave = False):
        sleep(0.01)

as external command in jupyter results in

Image

The underlying issue (I believe) is that the "terminal" which jupyter provides does not handle basic ANSI navigation commands, and I filed an issue on that a number of years back

I just wanted to formulate this issue here for backreference there.

  • I have marked all applicable categories:
    • exception-raising bug
    • visual output bug
  • I have visited the [source website], and in particular
    read the [known issues]
  • I have searched through the [issue tracker] for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    import tqdm, sys
    print(tqdm.__version__, sys.version, sys.platform)
4.67.1 3.13.3 (main, Apr 10 2025, 21:38:51) [GCC 14.2.0] linux

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