-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Progress Bars keep printing new lines on Windows #16
Comments
Thank you for letting me know about the issue. Would you mind also letting me know the OS, Python version, and Terminal app that you are using, please? |
hi Tai The code gives a similar output on the terminal running inside VS Code as well. |
even though after scrolling a new bar appears |
Thank you for letting me know. I apologize for the delay. I don't have access to a windows machine at the moment and cannot test it. I will try when I can use Windows. |
Also there is issue on linux too. When the threads exceed size of terminal window, and when I scroll it it duplicates printing of progress bars |
@SwapnilSoni1999 I see. I think that that is a different issue. Would you mind creating a new issue? |
Sure sir i ll upload screen record if possible |
@SwapnilSoni1999 Sounds great. Thank you. |
@pranjalchaubey, I released the version 1.1.2. I updated the escape code for controlling the cursor on the terminal. This version might work on Windows although I haven't had a chance to test it because I didn't have a Windows machine. |
Thanks @TaiSakuma, I will check it out! |
@pranjalchaubey, that is great. Thank you. |
@udptcp, thank you for letting me know. Would you mind letting me the version of Windows that you used? You wrote that you used "windows CMD". That is Windows Console, I assume. I think that atpbar might work on Windows Terminal because it seems to support ANSI escape code. |
Thanks @TaiSakuma I use Windows 10 LTSC version 1607 and tested with Windows Console. Windows Terminal needs at least version 1903 to work, so I can't check this out. |
@udptcp, thank you for letting me know about Windows Terminal. I wasn't aware that it only works with recent versions of Windows 10. Thank you also for the screenshot on PuTTY. It might work there if the terminal is a bit wider. At the moment, atpbar doesn't work properly if the terminal width is less than 90 characters (I intend to fix it someday). |
On Windows, you have to call SetConsoleMode with ENABLE_VIRTUAL_TERMINAL_PROCESSING (see https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#cursor-positioning). Doing so in python is explained here: https://stackoverflow.com/questions/36760127/how-to-use-the-new-support-for-ansi-escape-sequences-in-the-windows-10-console I put kernel32 = ctypes.windll.kernel32 |
A much more robust version of the code is here: https://bugs.python.org/issue30075 |
Hi
I am trying the simple two progress bars example, but my terminal is printing each bar on a newline.
How to fix this problem?
The text was updated successfully, but these errors were encountered: