按类别查询搜索结果
关于关键词 的检测结果,共 346
huaianlb | 2017-01-11 16:31:22 | 阅读(4710) | 评论(0)
在新装的centos系统中,用源码安装supervisor提示如下:[plain] view plain copy [root@1e supervisor-3.0]# python setup.py install  Traceback (most recent call last):    File "setup.p...【阅读全文】
huaianlb | 2017-01-09 16:03:57 | 阅读(1010) | 评论(0)
在Linux CentOS 6.6上安装Python 2.7.9 CentOS 6.6自带的是Python 2.6.6,而编译llvm需要Python 2.7以上。checking for python... /usr/bin/pythonchecking for python >= 2.7... not foundconfigure: error: found python 2.6.6 (/usr/bin/python); required >= 2.7yum中最新的也是Python 2.6.6,只能下载P...【阅读全文】
zyhzycfj | 2016-12-23 15:04:21 | 阅读(700) | 评论(0)
根据shell脚本执行结果,Python抽取处理,转成excel,后续只在需要集成到批量ssh登录程序中即可找他们银行主管商量可以批量部署弥补他们现在的监控的不足及错误。网银系统192.168.126.165  文件系统Inode使用...【阅读全文】
【系统运维】 python下ssh及sftp登录
zyhzycfj | 2016-12-23 14:56:03 | 阅读(440) | 评论(0)
ssh及sftp,批量登录上传文件及执行时可以直接复用。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35#author zyh...【阅读全文】
【系统运维】 python格式化时间
gyq0618 | 2016-12-16 11:31:06 | 阅读(2910) | 评论(0)
import datetimea = "2011-09-28 10:00:00"b = datetime.datetime.strptime(a,'%Y-%m-%d %H:%M:%S')print b2011-09-28 10:00:00使用datetime模块可以直接将字符串格式化成时间,time得先转换成strptime转换成时间数组,然后在使用strftime格式化需要个时间格式以下转载一篇文章:1.将字符串的时间转换为时间戳...【阅读全文】
gyq0618 | 2016-12-12 22:27:58 | 阅读(1450) | 评论(0)
#-*-coding:utf-8-*-#!/usr/bin/pythonimport re    #导入re模块x=open('2.txt','r+')    #打开文件w=open('1.log','a+')    #打开文件for line in x.readlines():    #循环读取数据  s=re.findall(r"\"deviceId\"\:\"\d+\"",...【阅读全文】
【系统运维】 python 一马当先
gyq0618 | 2016-12-09 10:24:23 | 阅读(1420) | 评论(0)
题:下过象棋的人都知道,马只能走'日'字形(包括旋转90°的日),现在想象一下,给你一个n行m列网格棋盘, 棋盘的左下角有一匹马,请你计算至少需要几步可以将它移动到棋盘的右上角,若无法走到,则输出-1.如n=1,m=2,则至少需要1步;若n=1,m=3,则输出-1。解:def f(n,m):    step = ((1,2),(2,1),(...【阅读全文】
国辉110 | 2016-11-10 19:41:55 | 阅读(400) | 评论(0)
首先要搞清楚,字符串在Python内部的表示是unicode编码. 因此,在做编码转换时,通常需要以unicode作为中间编码,即先将其他编码的字符串解码(decode)成unicode,再从unicode编码(encode)成另一种编码。 decode的作用是将其他编码的字符串转换成unicode编码, 如str1.decode('gb2312')...【阅读全文】
bbzsxjj | 2016-10-25 12:07:07 | 阅读(4320) | 评论(0)
python实例 python学习 python交流 python中的列表【阅读全文】
hanye韩也 | 2016-09-27 10:25:51 | 阅读(770) | 评论(0)
Linux之CentOS 6.8 安装Python 3.4.5 和iPython 5.1【阅读全文】
【系统运维】 Python—redis
chengxuyonghu | 2016-09-19 11:06:53 | 阅读(1200) | 评论(0)
一、redis  redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hash(哈希类型)。这些数据类型都支持push/pop、add/remove及取交集并集和差集及更丰富的操作,而且这些操作都是原子性的。在此基础上...【阅读全文】
【系统运维】 python ip转换
badb0y | 2016-08-22 17:17:46 | 阅读(1110) | 评论(0)
ip2int = lambda x: sum([256 ** j * int(i) for j, i in enumerate(x.split('.')[::-1])])int2ip = lambda x: '.'.join([str(x/(256**i)%256) for i in range(3,-1,-1)]) print int2ip(ip2int('192.192.192.192'))【阅读全文】
jun270148122 | 2016-08-10 11:46:15 | 阅读(1340) | 评论(0)
    忘记从哪里搂来的脚本了,ssh server后,vim 没法正常使用点击(此处)折叠或打开#!/usr/bin/python#--*-- coding:utf-8 --*--import socketimport sysimport getoptimport...【阅读全文】
【系统运维】 python描述符
jun270148122 | 2016-08-09 10:13:07 | 阅读(960) | 评论(0)
点击(此处)折叠或打开import sys   '''  当使用实例对象访问属性时,都会调用__getattribute__内建函数 __getattribute__查找属性的优先级 1、类属性 2、数据描述符...【阅读全文】
行者靖 | 2016-08-05 20:53:59 | 阅读(1780) | 评论(0)
1. 安装xlwt模块 1)下载地址 https://pypi.python.org/pypi/xlwt#downloads 2)安装方法 tar zxvf xlwt-1.1.2.tar.gz cd xlwt-1.1.2 python setup.py install 2. 目标execl文件 ssh_err ping_err 192.168.1.1 192.168.11.1 192.168....【阅读全文】
【系统运维】 python基础
sxm5211258 | 2016-07-22 17:05:56 | 阅读(1050) | 评论(0)
一、关键字(Keywords): 点击(此处)折叠或打开在python2.7版本中关键字有31个,如下:and,or,not            #逻辑与或非运算;with...as            #简...【阅读全文】
【系统运维】 python安装二
运维之路 | 2016-07-18 17:22:01 | 阅读(1790) | 评论(0)
1,下载lnux 的release文件wget http://li.nux.ro/download/nux/dextop/el6/i386/nux-dextop-release-0-2.el6.nux.noarch.rpmrpm -ivh nux-dextop-release-0-2.el6.nux.noarch.rpmyum -y install python27yum -y install python27-devel2,升级pythonCentos默认还是使用python2.6.*,需要用python2.7的文件覆盖python...【阅读全文】
【系统运维】 python安装一
运维之路 | 2016-07-18 17:20:04 | 阅读(1620) | 评论(0)
Python2.7.6的安装方法:1.下载源代码 https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz2.安装解压、编译、安装命令如下:# xz -d Python-2.7.6.tar.xz# tar xvf Python-2.7.6.tar# cd Python-2.7.6/# ./configure --prefix=可以指定安装路径,也可以不指定,默认安装到/usr/local/bin/# make ...【阅读全文】
sxm5211258 | 2016-06-21 11:59:31 | 阅读(1960) | 评论(0)
1、添加python环境变量:    我的电脑>属性>高级系统设置>环境变量>系统变量;    将D:\python3.5.1添加到Path末尾处用;分隔。2、安装pip:    下载地址:https://pypi.python.org/pypi/pip#downloads    下载pip-8.1.2.tar.gz     解压到D:\python3.5...【阅读全文】
【系统运维】 python JSON 用法
liubonan | 2016-06-19 18:00:22 | 阅读(2320) | 评论(0)
Python 2.7 自带 JSON 模块【官方文档】1. 从python原始类型向json类型的转换过程,具体的转换如下:1234import jsonjson.dump(obj, fp, ...【阅读全文】