Closed GChalony closed 4 years ago
Thanks for reporting! Screen is already supported, we just need to figure out why you're having issues in that configuration. I just need a little bit of information to further troubleshoot this.
Thanks for the quick reply :)
I'm running enlighten 1.6.0
and WSL2.
I don't actually see the pb when I run the same code in screen on my local computer, though obviously it's not exactly the same configuration (windows for one thing). So maybe it's SSH related ?
Minimum example
import logging
import enlighten
import time
logging.basicConfig(level=logging.DEBUG)
manager = enlighten.get_manager()
progress = manager.counter(total=100, desc='Prog')
for i in range(100):
logging.getLogger(__name__).info('Running at step {}'.format(i))
print(i)
progress.update()
time.sleep(0.2)
manager.stop()
Which gives me over SSH and locally.
Edit: I just realised the multiplying progressbars bug was my wrongdoing, I recreated a new one at each loop, sorry :pray:
Is it working as expected now?
Nop, the screenshots above still show the format pb :)
Just to be sure we're on the same page, you don't see the issue under these scenarios?
You do see the issue:
I don't see the issue
I do see the issue
When you SSH without screen, do the bars show up like they do locally (solid blocks) or do they show up as diamonds?
Do you have the same behavior if you use CMD or powershell instead of Windows Terminal?
Do you have a way of testing ssh under screen from another Linux system?
Yes, in SSH without screen the bars show correctly.
CMD and PowerShell (tested in WSL2) show the same behavior (works without screen, doesn't with).
And tested from another Debian 10 machine, the same problem appears.
What is strange to me are those diamonds. That tells me screen is not passing unicode correctly. Try starting screen with -U or ctrl-a :utf8 on.
Also, what version of Python are you using?
Hurray ! screen -U ...
did it ✨
I'm happy with that, but if you want to investigate more tell what info you need ;) I'm running python 3.7.3.
It makes sense. Essentially Enlighten is using Unicode because it detects it in the locale on the remote system, but if screen or screen in combination with SSH doesn't know it should be using Unicode, it won't interpret the characters correctly. Unfortunately, I don't really have a way to detect that. I was testing with Fedora and openSUSE and I didn't have the issue, so I'm guessing it's related to the distro's default settings. I can try to add something to the FAQ.
I use screen to launch long running programs over SSH, and when I discovered Enlighten I figured it would be really cool to use it to monitor the running process.
Unfortunately it seems enlighten doesn't like screen too much (or is it the terminal? sorry I'm new to the terminal world).
I don't know if it's relevant, but the program is running on a Debian 10 on a
screen.xterm-256color
terminal, to which I'm connected via SSH in a WSL environment using Windows Terminal.However everything looks nice in the same environment/terminal when I run it locally.
Concerning the support requirements :
echo $STY
tput cols / rows
seems to work, not sure if that's enough.Tell me if I missed anything ;) thanks for you awesome work btw!