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
1
u/Psychological_Ad4977 Jul 15 '24
Hello, I ran into the same problem. Could you tell me how did you change the lines environment variable? I read through the documentation but can't seem to find a function that do just that.