跳转到主要内容

Pygcurse(发音为“pig curse”)是运行在Pygame框架之上的curses库模拟器。

项目描述

Pygcurse

http://inventwithpython.com/pygcurse

https://github.com/asweigart/pygcurse

Pygcurse(发音为“pig curse”)是运行在Pygame框架之上的curses库模拟器。它提供了一种简单的方式来创建文字冒险、Rougelikes和基于控制台的程序。

遗憾的是,Python标准库中包含的curses库在Windows上无法工作。来自effbot的优秀Console模块提供了类似curses的功能,但它只能在Windows上运行,而不能在Mac/Linux上运行。通过使用Pygame,Pygcurse能够在所有平台上运行。

Pygcurse相较于常规的基于文本的stdio程序具有以下优势

1) Color text and background.
2) The ability to move the cursor and print text anywhere in the console window.
3) The ability to make console apps that make use of the mouse.
4) The ability to have programs respond to individual key presses, instead of waiting for the user to type an entire string and press enter (as with input()/raw_input()).
5) Since the console window that Pygcurse uses is just a Pygame surface object, additional drawing and transformations can be applied to it. Multiple consoles can also be used in the same program.

Pygcurse需要安装Pygame。Pygame可以从http://pygame.org下载

Pygcurse是由Al Sweigart (al@inventwithpython.com)开发的

https://github.com/asweigart/pygcurse

github仓库包含几个示例程序。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

pygcurse-1.0.1.tar.gz (27.9 kB 查看哈希值)

上传时间

支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面