python中跨平台控制台应用程序的类似curses的库 [英] curses-like library for cross-platform console app in python

查看:121
本文介绍了python中跨平台控制台应用程序的类似curses的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究用python开发一个控制台应用程序,该应用程序应该能够在Windows和Linux下运行.为此,我真的很想使用像curses这样的高级控制台库.但是,据我所知,curses在Windows上不可用.

I'm looking into developing a console application in python which should be able to run under Windows as well as Linux. For this, I'd really like to use a high-level console library like curses. However, as far as I know, curses is not available on Windows.

我还有什么其他选择?不幸的是,在Windows下不能使用cygwin ...

What other options do I have? Unfortunately, using cygwin under Windows is not an option...

感谢您的帮助!

推荐答案

有一个 wcurses .我从未尝试过,但它可能满足您的需求.听起来好像并没有完全的curses兼容性,但是可能足够接近了.另外,它可能没有使用DOS终端,而是打开了一个GUI窗口并在其中绘制等距文本.

There is a wcurses. I've never tried it but it may meet your needs. It sounds like it doesn't have full curses compatibility, but may be close enough. Also it might not be using the DOS terminal, but opening a GUI window and drawing monospaced text inside.

其他Windows文本模式选项为:

Other windows text mode options are:

  • The console module;
  • wconio -- based on Borland's C conio library.

我相信两者都是Windows.

I believe both are windows only.

这篇关于python中跨平台控制台应用程序的类似curses的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆