UserWarning: Failed to setupterm(kind='cygwin'): Could not find terminal cygwin
DominickVale opened this issue · comments
I'll start off by saying i'm not very knowledgeable in terminals and that I'm still learning...
I wrote a Pomodoro timer for practicing, I wanted to print things in a sort of custom made box by just reprinting over the same lines with the t.location context. So far this is what I got working:
def printMessage(message,):
with t.location():
print('\n\n')
print(t.center("", fillchar="@"))
print("@" + t.move_right(t.width) + "@")
print(t.center(f" {message} ", fillchar="~"))
print("@" + t.move_right(t.width) + "@")
print(t.center("", fillchar="@"))
in my program it gets called on every update (basically every second in this case). It works correctly on Linux with konsole and on window's cmd and powershell, but for some reason it doesn't when using cmder(conEmu - cygWin)...
full warning:
terminal.py:190: UserWarning: Failed to setupterm(kind='cygwin'): Could not find terminal cygwin
screenshots for reference:
not working on cygwin:
Notice also how for some reason the print("@" + t.move_right(t.width) + "@")
isn't correctly working either
Try shell command in your cygwin environment before running the python script,
export TERM=xterm
This might work.
With "WSL" (windows subsystem for linux), I'm not sure cygwin has much of a future. I've used it many times over the years, and I can't think of any reason anyone would continue to use it today (unless they're stuck with it for some reason). Conemu should work fine with WSL.
Thank you very much. Setting that env variable worked.
I agree on using wsl and I was actually thinking of making the switch but i still wanted to find a solution for this.
Happy to help, have a great evening!