Python Issue With Curses.intscr()
I am new in Python and I am using curses for my script. But when I am try to run the script in server(let say 1) I am getting below error. _curses.error: addstr() returned ERR And
Solution 1:
You could try splitting your "huge" string:
from __future__ import division #You don't need this in Python3from math import *
string = "0123456789012345678901234567890123456789"
columns = 5
rows = int(ceil(len(string)/columns))
for row inrange(1,rows+1):
panel.addstr(row,1,string[(row*columns)-columns:row*columns])
This will print these strings from the starting one:
01234
56789
01234
56789
01234
56789
01234
56789
This was the answer to this question: Formatting text to fit within a box in Python/Curses
Post a Comment for "Python Issue With Curses.intscr()"