【发布时间】:2018-09-23 18:06:24
【问题描述】:
我正在寻找如何用 Python 为我的程序编写一个(相对)友好的用户界面,据我所知,我需要一个名为“curses”的模块。我试图通过 pip 方法安装它,但是 shell 说没有为指定的模块找到匹配的分布。我做错了什么还是什么?模块是否因某种原因被拆除?如果是这样,考虑到我只需要让箭头键为我的程序工作,我还能如何编写这样的界面? 提前致谢
【问题讨论】:
-
您是否尝试使用
curses编写Windows 程序?如果是这样,来自official documentation:The Windows version of Python doesn’t include the curses module. A ported version called UniCurses is available. You could also try the Console module written by Fredrik Lundh, which doesn’t use the same API as curses but provides cursor-addressable text output and full support for mouse and keyboard input. -
好的,你的意思是我实际上不能使用它。伟大的。 Console 模块仅针对 python 2x 编写,我将尝试使用 unicurses。
-
我建议使用 PyQt5 模块。这是一个用于构建 GUI 的优秀模块
-
@MattLee 我建议使用 IPython 开发 GUI interactively,即使您只使用 tkinter。它确实支持
qt,也支持wx和gtk。
标签: python user-interface python-curses