Python内置的subprocess.Popen对象
具体内容参见:https://docs.python.org/3/library/subprocess.html
大概来说,就是可以对应输入的命令产生一个进程,该进程实例内置如下方法。
| communicate(self, input=None, timeout=None)
| Interact with process: Send data to stdin. Read data from
| stdout and stderr, until end-of-file is reached. Wait for
| process to terminate. The optional input argument should be
| bytes to be sent to the child process, or None, if no data
| should be sent to the child.
|
| communicate() returns a tuple (stdout, stderr).
|
| kill = terminate(self)
|
| poll(self)
|
| send_signal(self, sig)
| Send a signal to the process.
|
| terminate(self)
| Terminates the process.
|
| wait(self, timeout=None, endtime=None)
| Wait for child process to terminate. Returns returncode
| attribute.
在windows系统中,kill是terminate方法的别名,在linux系统中,kill向进程发送SIGKILL信号,terminate方法向进程发送SIGTERM信号。
Python内置的subprocess.Popen对象的更多相关文章
- 浅谈Python内置对象类型——数字篇(附py2和py3的区别之一)
Python是一门面向对象的编程设计语言,程序中每一样东西都可以视为一个对象.Python内置对象可以分为简单类型和容器类型,简单类型主要是数值型数据,而容器类型是可以包含其他对象类型的集体,如序列. ...
- python内置函数
python内置函数 官方文档:点击 在这里我只列举一些常见的内置函数用法 1.abs()[求数字的绝对值] >>> abs(-13) 13 2.all() 判断所有集合元素都为真的 ...
- python 内置函数和函数装饰器
python内置函数 1.数学相关 abs(x) 取x绝对值 divmode(x,y) 取x除以y的商和余数,常用做分页,返回商和余数组成一个元组 pow(x,y[,z]) 取x的y次方 ,等同于x ...
- Python内置函数解析
我们知道,为了方便使用,python内置了一系列常用及关键的函数,如type().下面将对这些函数进行逐一分析.解释. Python内置函数表: 1. abs():返回绝对值.如abs(-1)= 1. ...
- python内置函数的归集
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明. Python内置(built-in)函数随着python解释器的运行而创建.在Pytho ...
- Python补充03 Python内置函数清单
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明. Python内置(built-in)函数随着python解释器的运行而创建.在Pytho ...
- Python内置函数(15)——memoryview
英文文档: class memoryview(obj) memoryview objects allow Python code to access the internal data of an o ...
- Python内置函数(12)——str
英文文档: class str(object='') class str(object=b'', encoding='utf-8', errors='strict') Return a string ...
- Python内置函数(61)——str
英文文档: class str(object='') class str(object=b'', encoding='utf-8', errors='strict') Return a string ...
随机推荐
- spring分页
1.Brand 商品品牌类 public class Brand { private Integer id; private String name; private String descripti ...
- myeclipse2014安装aptana3.4.0插件(转)
1.下载aptana3.4.0_eclipse的zip包 http://pan.baidu.com/s/1qXOiZl6 或者是:https://pan.baidu.com/s/1jIqOYcI 2 ...
- ORACLE 如何产生一个随机数
1.select dbms_random.string('x', 3) from dual ; x是类型,3是长度. /* opt可取值如下: 'u','U' : 大写字母 'l','L' ...
- avcodec_decode_video2少帧问题
使用libav转码视频时发现一个问题:使用下面这段代码解码视频时,解码中会不时丢掉几帧. ){ ret = avcodec_decode_video2(video_dec_ctx, vframe, & ...
- Flask中的蓝图(BluePrint)、
蓝图 1.初识Flask蓝图(BluePrint) 创建一个项目然后将目录结构做成: user.py中的内容 from flask import Blueprint, render_template ...
- 【转】web.xml配置项详解
史上最全web.xml配置文件元素详解 一.web.xml配置文件常用元素及其意义预览 1 <web-app> 2 3 <!--定义了WEB应用的名字--> 4 <d ...
- Unity时钟定时器插件——Vision Timer源码分析之一
因为项目中,UI的所有模块都没有MonBehaviour类(纯粹的C#类),只有像NGUI的基本组件的类是继承MonoBehaviour.因为没有继承MonoBehaviour,这也不能使用Updat ...
- http://218.245.4.98:20000/phpmyadmin:2018SCTF--easiest web - phpmyadmin
SCTF的web最简单题,好难好难好难. 直接进去就是PHPmyadmin界面(即mysql的网页界面),需要登录密码,这个我当时没有破解出来,谁知道账号密码是root/root咩,要是 ...
- f5电源模块损坏
现象: ssh登录f5后有日志显示 现场确认f5 2槽电源指示灯不亮,且电源线正常.重新开关电源模块,拔插电源线后仍不亮.故确认是电源模块损坏. 处理:直接采购新的电源模块更换即可.f5电源支持热插拔 ...
- [leetcode]428. Serialize and Deserialize N-ary Tree序列化与反序列化N叉树
Serialization is the process of converting a data structure or object into a sequence of bits so tha ...