码迷,mamicode.com
首页 >  
搜索关键字:popen    ( 539个结果
LAMP第三部分php,mysql配置
php配置1. 配置disable_functiondisable_functions = eval,assert,popen,passthru,escapeshellarg,escapeshellcmd,passthru,exec,system,chroot,scandir,chgrp,chown...
分类:数据库   时间:2015-05-26 15:36:33    阅读次数:148
pad时间同步
#!/usr/bin/python #!_*_coding:utf-8_*_ importos #importdatetime importtime #获取文件在系统的时间戳 SysTime=int(os.popen("stat-t/home/ftp/sync.log|awk‘{print$12}‘").read()) #读取文件内记录的时间戳 WinTime=int(open(‘/home/ftp/sync.log‘,‘r‘).read()) ifSysTime..
分类:其他好文   时间:2015-05-22 19:21:14    阅读次数:224
花生壳动态IP域名解析之python自动提交公网IP
#!/usr/bin/env pythonimport reimport osimport timeimport randomip_current = ''while True: myip = re.findall(r'\d+\.\d+\.\d+\.\d+',os.popen('curl -s...
分类:编程语言   时间:2015-05-22 18:56:05    阅读次数:196
python subprocess模块
转http://blog.csdn.net/imzoer/article/details/8678029subprocess的目的就是启动一个新的进程并且与之通信。subprocess模块中只定义了一个类: Popen。可以使用Popen来创建进程,并与进程进行复杂的交互。它的构造函数如下:subp...
分类:编程语言   时间:2015-05-20 00:01:59    阅读次数:372
linux下C和shell调用的popen函数
说明: 本文介绍popen函数的使用方法和行为机理,并给出实际的例子来辅助说明了popen函数的使用方法。popen函数使用FIFO管道执行外部程序,首先让我们看看popen的函数原型吧:#include FILE *popen(const char *command, const char *t....
分类:系统相关   时间:2015-05-17 18:38:44    阅读次数:160
Linux下使用popen()执行shell命令
简单说一下popen()函数函数定义#include FILE * popen(const char *command , const char *type );int pclose(FILE *stream);函数说明 popen()函数通过创建一个管道,调用fork()产生一个子进程,执行一个....
分类:系统相关   时间:2015-05-17 18:11:41    阅读次数:160
php -- PHP在linux上执行外部命令,system(),exec(),shell_exec()
目录:一、PHP中调用外部命令介绍二、关于安全问题三、关于超时问题四、关于PHP运行linux环境中命令出现的问题一、PHP中调用外部命令介绍在PHP中调用外部命令,有三种方法:1. 调用专门函数2. 反引号3. popen()函数打开进程方法一:调用PHP提供的专门函数(四个):PHP提供4个专门...
分类:Web程序   时间:2015-05-15 15:09:40    阅读次数:831
获取ping的最短、最长、平均时间
# -*- coding: utf-8 -*-import osimport rep = os.popen('ping 120.26.77.101')out = p.read()regex = re.compile("\xd7\xee\xb6\xcc = (\d+)ms\xa3\xac\xd7\xe...
分类:其他好文   时间:2015-05-14 11:35:18    阅读次数:206
php基本配置
找到php配置文件,查看配置文件路径命令:/usr/local/php/bin/php-i|head1.配置disable_functiondisable_functions=eval,assert,popen,passthru,escapeshellarg,escapeshellcmd,passthru,exec,system,chroot,scandir,chgrp,chown,escapeshellcmd,escapeshellarg,shell_exec,pro..
分类:Web程序   时间:2015-05-09 06:38:52    阅读次数:172
python 获取subprocess实时输出信息
importsubprocessp=subprocess.Popen("pingwww.baidu.com-n6",shell=True,stdout=subprocess.PIPE)#一下面是第一种方法(使用时请先注释第二种方法)foriiniter(p.stdout.readline,b‘‘):printi.rstrip()#下面是第二种方法(使用时请先注释第一种方法)returncode=p.poll()#用于..
分类:编程语言   时间:2015-05-08 18:21:25    阅读次数:143
539条   上一页 1 ... 43 44 45 46 47 ... 54 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!