下午好
我尝试使用curses,这个脚本的一个要求是接受大量的数据。数据是用来粘贴的,虽然通常只有几千行,但很容易就可以增长到数万行。我的问题似乎是我的输入仅限于窗口的大小?在
例如:
begin_x = 0
begin_y = 0
height = 15
width = 30
window = curses.newwin(height, width, begin_y, begin_x)
c = window.getstr()
stdscr.addstr(0, 0, str(c.count(b'a')), curses.color_pair(1))
stdscr.refresh()
当我输入尽可能多的'a'字符时,输出为449。在
有没有办法把这个提高一点?我试图将窗口设置得更大,但仍达到1024个最大值。在
快去救人!在
我想到的是:
d是一个字符串,c是getkey(一个1个字符的字符串)的结果如果它收到newline,quit。如果没有,继续循环直到我们得到新线。在
相关问题 更多 >
编程相关推荐