是否有与 Python 3 兼容的终端小部件库?

发布于 2024-09-29 18:55:39 字数 216 浏览 0 评论 0原文

我正在寻找一个终端 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

提笔书几行 2024-10-06 18:55:39

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文