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第三方库


热门话题
java Android同步不同页面上的按钮   java评测每个类收集的垃圾对象实例数   java(Spring MVC+Hibernate 4+Test 4)自动连线DAO返回NULL   java Android编辑文本和虚拟键盘   java Selenium与BrowserMobProxy   JAVAlang.NoClassDefFoundError:com/sun/jersey/spi/inject/Errors$关闭原因?   java为什么在我成功登录后仍然会出现“不正确的帐户或密码或用户类型”   安卓应用程序在重新启动java时崩溃。网UnknownHostException:无法解析主机   多线程在Java中同步共享静态对象的正确方法是什么?   未调用自定义注释的java类验证(约束类)   java如何将指定目录的存档文件放入所需位置?   java如何识别Selenium中的每个编辑文本字段,如果它们的Xpath都相同   使用gwtmockito/mockito的java简单单选按钮单元测试?