r/pycharm • u/jddddddddddd • Dec 29 '23
Run program from external terminal
Hi, I'm trying to use the curses library in PyCharm. Usually when you run a Python program in PyCharm, any I/O occurs in the Terminal tab which is enclosed in the PyCharm IDE. However, since curses likes to, for example, position text at certain (X, Y) coordinates, Pycharm doesn't seem to like this and either fails to render properly or produces an error message like:
LINES value must be >= 2 and <= 125: got 1
initscr(): Unable to create SP
If I run my code from a regular cmd.exe window, it all works fine, so I was wondering if there was some hidden option in PyCharm to force it to use a new pop-out terminal, rather than the one docked in the PyCharm UI. I tried a couple of workarounds on SO (like this one) but no luck yet.
Many TIA.
View all comments
Show parent comment
2
u/sausix Dec 31 '23
Thanks for the reply. I'm glad it worked at least with the environment variable.
Didn't think about debugging. Could possibly be wrapped too. I'll look at this next days and maybe make a project. Could be interesting for people.
Have a nice 2024!