screen类允许您对dos终端进行定位写入。

dosbox-screen的Python项目详细描述


– Screen positioning and colors in the dos shell (and unix too)
Documentation Status

安装

pip install doscmd-screen

更改

版本1.1.0引入了screen.color(“txt”,fg=”white',bg=”blue'),其中 返回一个稍后可以打印的字符串。

版本1.0.3通过window类引入线程安全的窗口区域。

版本1.0中的更改包括对非DOS平台的支持 测试脚本,以及基于零的屏幕位置索引。从上次开始 一个是向后不兼容的更改我已经升级了主要版本 号码。我不放弃任何向后不兼容的变化 这个模块。

用法

终端中的直接定位和终端颜色:

import screen  # screen probably needs to be your first import.
scr = Screen()
scr.centerxy(scr.center, scr.middle, '((.))')

scr.writexy(scr.left, scr.bottom,
            'left bottom',
                    color='black', on='red')

适用于两个窗口..

https://raw.githubusercontent.com/thebjorn/doscmd-screen/master/docs/_static/screenshot-dos.png

和类Unix终端:

https://raw.githubusercontent.com/thebjorn/doscmd-screen/master/docs/_static/screenshot-linux.png

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带Maven的Eclipse Java存储库:缺少工件:compile   java如何以编程方式停止RMI服务器并通知所有客户端   java Roboguice抛出ClassNotFoundException:AnnotationDatabaseImpl   java为什么lucene 4.0删除IndexWriter类的两个构造函数?   nls如何避免java项目上不需要的日志消息?   测试无法在Selenium Webdriver(java)中定位iframe   使用XML的java servlet   java如何使用jxl用****屏蔽单元格   java使用SQLite从数据库中选择“没有这样的列”   导入扫描程序后出现java编译错误   插入查询的java空指针异常   使用创建PostgreSQL数据库。Java应用中的sql脚本   java使用jsoup将HTML解析为格式化的明文