Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Multiple lines are printed in IDLE (Ubuntu 14.04, python2.7) #23

@ofir-reich

Description

@ofir-reich
for i in tqdm.trange(10):
    time.sleep(0.3)

  0%|          | 0/10 [00:00<?, ?it/s]�[A
 10%|█         | 1/10 [00:00<00:02,  3.32it/s]�[A
 20%|██        | 2/10 [00:00<00:02,  3.30it/s]�[A
 30%|███       | 3/10 [00:00<00:02,  3.29it/s]�[A
 40%|████      | 4/10 [00:01<00:01,  3.28it/s]�[A
 50%|█████     | 5/10 [00:01<00:01,  3.27it/s]�[A
 60%|██████    | 6/10 [00:01<00:01,  3.27it/s]�[A
 70%|███████   | 7/10 [00:02<00:00,  3.27it/s]�[A
 80%|████████  | 8/10 [00:02<00:00,  3.26it/s]�[A
 90%|█████████ | 9/10 [00:02<00:00,  3.26it/s]�[A
100%|██████████| 10/10 [00:03<00:00,  3.26it/s]�[A
�[A

Some strange characters are printed instead of the carriage return action. I thought this worked for me before, but maybe I changed something.
This only happens in IDLE. When I try the python in Shell it behaves fine (except that it stays there after the loop is over).
Is there a quick fix I'm not aware of? I've had problems with the carriage return thing when I tried to create a progress bar myself. Ubuntu 14.04 is common enough that I thought this would be solved.

Thanks for the amazing project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions