Python终端仿真 [英] Python terminal emulation
本文介绍了Python终端仿真的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Python应用程序中运行与xterm兼容的虚拟终端. 我需要在其中运行基于ncurses的应用程序,向其提供用户输入并读取其输出.
I'd like to have an xterm-compatible virtual terminal running inside a Python app. I'll need to run ncurses-based applications inside it, feed it with user's input and read its output.
到目前为止,我已经找到了python-vte,但是它仅提供了GTK +小部件(libvte具有必需的VtePty类,但Python绑定没有),并且具有不可接受的libgtk依赖性.
So far I've found python-vte, but it only provides a GTK+ widget (libvte has the required VtePty class, but Python bindings don't) and has an unacceptable libgtk dependency.
还有其他方法可以在Python中执行最终仿真吗?
Is there any other way to perform a teminal emulation in Python?
推荐答案
毕竟,我发现了 pyte ,这正是我想要的.
After all, I've found the pyte, which is exactly what I wanted.
这篇关于Python终端仿真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文