是否有与 Python 3 兼容的终端小部件库?
我正在寻找一个终端 UI 库,提供与 python3 兼容的按钮、复选框等小部件。
我尝试过:
- pycdk(pyrex不能与python3一起使用,并且移植它是一团糟)
- urwid(不能与python3一起使用,它有一个端口,但不能很好地与新的curses接口一起使用)。
有人知道这样的图书馆吗?
谢谢!
I'm looking for a terminal UI library providing widgets like buttons, checkboxes and so on, that is compatible with python3.
I've tried:
- pycdk (pyrex does not work with python3, and porting it is a mess)
- urwid (does not work with python3, it has a port but not working well with new curses interface).
Does anyone know such a library?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Cython 支持 Python 3,我可以通过将所有
__new__
更改为__cinit__
来使 Cython 接受 pyx 文件。请注意,此时示例仍需要移植到 Python 3。尝试运行示例时,我收到“TypeError:预期字节,找到 str”。将所有字符串切换为字节有效。
如果 API 也接受 Python 3 下的字符串可能会更好,但这肯定需要更多工作。
Cython supports Python 3, and I was able to make Cython accept the pyx file by changing all
__new__
to__cinit__
.Note that the examples still needs some porting to Python 3 at that point. I get "TypeError: expected bytes, str found" when trying to run the examples. Switching all the strings to bytes worked.
Possibly it would be better if the API accepted strings under Python 3 too, but that is definitely more work.