Setupterm could not find terminal, in Python program using curses

前端 未结 6 1651
礼貌的吻别
礼貌的吻别 2020-11-28 13:07

I am trying to get a simple curses script to run using Python (with PyCharm 2.0).

This is my script:

import curses
stdscr = curses.initscr()
curses.n         


        
6条回答
  •  眼角桃花
    2020-11-28 13:49

    You must set enviroment variables TERM and TERMINFO, like this:

    export TERM=linux
    export TERMINFO=/etc/terminfo
    

    And, if you device have no this dir (/etc/terminfo), make it, and copy terminfo database.

    For "linux", and "pcansi" terminals you can download database:

    • http://forum.xda-developers.com/attachment.php?attachmentid=2134052&d=1374459598
    • http://forum.xda-developers.com/showthread.php?t=552287&page=4

提交回复
热议问题