智慧屏 安装 app如何提升家庭娱乐与教育体验的关键工具
1132
2022-10-29
pexpect: 在一个伪终端中控制交互程序,就像 GNU expect 一样
Pexpect is a Pure Python Expect-like module
Pexpect makes Python a better tool for controlling other APPlications.
Pexpect is a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. Pexpect works like Don Libes' Expect. Pexpect allows your script to spawn a child application and control it as if a human were typing commands.
Pexpect can be used for automating interactive applications such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup scripts for duplicating software package installations on different servers. It can be used for automated software testing. Pexpect is in the spirit of Don Libes' Expect, but Pexpect is pure Python.
The main features of Pexpect require the pty module in the Python standard library, which is only available on Unix-like systems. Some features—waiting for patterns from file descriptors or subprocesses—are also available on Windows.
If you want to work with the development version of the source code then please read the DEVELOPERS.rst document in the root of the source code tree.
Free, open source, and all that good stuff.
You can install Pexpect using pip:
pip install pexpect
Docs on ReadTheDocs
PEXPECT LICENSE:
http://opensource.org/licenses/isc-license.txtCopyright (c) 2013-2014, Pexpect development teamCopyright (c) 2012, Noah Spurrier
This license is approved by the OSI and FSF as GPL-compatible.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~