服务器端:#!/usr/bin/env pythonimport socketimport reimport timeimport threadingdef dic(): dic = {} with open('/script/ip.txt') as f:
文件内容:[docker]un = 192.12.32.12foe = 10.1.2.3[mysql]mydb = 172.2.3.1脚本内容:getJson(file): ConfigParser config cf = config.ConfigParser() &nb
#!/usr/bin/env python#coding: utf-8author='yangyang'import urllib2import cookielibimport urllibimport base64import timeimport randomdef s_email(data): _user = "915615960@qq.com" 
现在把知道的调用方式写下来os方式: os.system(' command [option] ') print os.popen(' command [option] ').read()commands: print commands.output(' command [option] ')subprocess: subprocess.call([
在python 下对比 2个文件中 的某一个文件缺少那些内容#!/usr/bin/env python#coding:utf8def file(file_name): fileA_list,fileB_list = [],[] fileA_name,fileB_name = file_name.split() with
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号