我正在尝试使用exec正常运行来自php的python脚本,但它给出了:
curses.wrapper(curses_loop) [5]
=> File "/opt/python27/lib/python2.7/curses/wrapper.py", line 22, in wrapper [6]
=> stdscr = curses.initscr() [7]
=> File "/opt/python27/lib/python2.7/curses/__init__.py", line 33, in initscr [8]
=> fd=_sys.__stdout__.fileno()) [9]
=> _curses.error: setupterm: could not find terminal
python脚本是一个在终端中工作正常的程序。这是一个货币图表,外汇和其他许多选项的程序。 我认为问题是该程序使用终端正常工作,无法在输出(stdout等)上模拟它。
此外,我尝试将wrapper.py更新为here,但失败了。错误再次发生。
我也试过,在终端export TERM=xterm-new
或export TERM=xterm-256color
,但又失败了。
我被困住了,请尽可能帮助,如果有可能的话。