随笔分类 -  python

摘要:vim keepalived_nginx.pyi# coding=utf-8import os,time,subprocess,threadingdef ping(Sip,Dip): Ip='ping -c 1 -I %s %s'%(Sip,Dip) p = subprocess.Popen([Ip 阅读全文
posted @ 2020-03-20 01:23 Le1543 阅读(188) 评论(0) 推荐(0)
摘要:yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel lib 阅读全文
posted @ 2019-11-19 21:37 Le1543 阅读(177) 评论(0) 推荐(0)
摘要:pip安装 curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py 阅读全文
posted @ 2019-11-19 21:29 Le1543 阅读(87) 评论(0) 推荐(0)
摘要:子类调用父类tyep父类执行__init__父类执行__call__父级__call__创建子类__new__父级__init__创建之类__init__new先于init执行但子级call要retrun init值才能调用父类这样才能实例化 阅读全文
posted @ 2019-10-25 14:48 Le1543 阅读(106) 评论(0) 推荐(0)
摘要:import re def AP(formula): formula = formula.replace('+-','-') formula = formula.replace('-+','-') formula = formula.replace('--','+') return formula 阅读全文
posted @ 2019-10-23 09:15 Le1543 阅读(139) 评论(0) 推荐(0)