Vim,Python和curses

0 python curses vim

我为vim编写了一个使用curses库的小python脚本.当我尝试调用curses函数时抱怨:

Traceback (most recent call last):
File "<string>", line 9, in <module>
File "/usr/lib/python2.6/curses/__init__.py", line 33, in initscr
fd=_sys.__stdout__.fileno())
_curses.error: setupterm: could not find terminal
Run Code Online (Sandbox Code Playgroud)

不知道怎么解决这个问题

编辑:GVIM抱怨Vim工作正常

for*_*ran 7

我对上下文不是很确定,但"GVIM抱怨Vim工作正常"非常有见地:在控制台中使用curses,gvim在X窗口中运行,因此没有控制台.