Closed eachimei closed 9 months ago
Suspecting this change:
Before this, set_console_mode()
was not invoked by just importing progressbar
You are very likely right... that mode enables 24 bit color support in your terminal but apparently it has side-effects in some cases.
For some reason the console mode isn't reverted back to it's original state once the script is done it seems so that's certainly a bug.
As a quick workaround, I can't reproduce the issue in PowerShell so that might help
Thanks for the quick response! I am able to reproduce it on Powershell as well:
Oh... that's odd. Generally on Linux/Unix systems this is caused by not having readline
available, but while it's better with readline, it doesn't solve the issue for me it seems.
You can try like this:
pip install pyreadline3
And after that:
import pyreadline3
pyreadline3.Readline()
Still buggy, this time pressing arrow keys makes parts of the terminal to disappear:
if I press some more arrow keys, it will erase more chunks:
I've pushed a fix to the develop branch, can you see if it works for you?
pip install "git+https://github.com/wolph/python-progressbar.git#egg=progressbar2"
Looks good! The issue does not reproduce with this version (commit 20f1bbb41f751824a28bbe7ea88cedf718b7a12a)
The new release is online!
Thanks @wolph ! I currently don't see a new release (4.4.2 ?) on pypi though: https://pypi.org/project/progressbar2/#history
Odd... I've attempted to upload it again and it seems to have worked this time :)
Cheers, thank you! Confirmed no issue using 4.4.2 👍
Description
With version 4.4.1 on Windows, after importing progressbar: pressing any arrow key yield odd symbols on the console:
Code
Versions
import sys; print(sys.version)
: 3.10.9import progressbar; print(progressbar.__version__)
: 4.4.1