reprint: Doesn't work properly on Ubuntu

Tried this on Ubuntu 16.04 x64 with Python 3.5.2 in both the default terminal and Terminator and the output doesn’t always print over the top of itself, instead printing on new lines as with regular print().

When I run the example from the README, none of the lines seem to reprint. I’ve also tried this other example and only the Total Progress line stays in the same spot (the Moving File line always prints on a new line).

Not sure if it matters, but I’m using zsh. I tried both of the above on OSX using Terminal.app (also using zsh) and it worked fine.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Not working on Windows 10 using Cmder – which is a wrapper for ConEmu. My case is probably a really niche one, but it is still a problem that you might want to know about. Python 3 if that makes any difference.

Horse

Files

EDIT:

It’s actually worse on the regular Command Line for Windows 10.

cmd

EDIT 2:

I fixed the problem by changing the magic character to \x1b[1A and changing the origin position (line 162) to print(magic_char * (max(last_output_lines, lines)), end=""). The escape code will not work on windows without using colorama though, so that would become a dependency and would require the line colorama.init() to be somewhere in the code (I have it on line 121).

Looks good!

It reproduces nicely on my machine.

Thank for the update.