随笔分类 - python自动化
摘要:1 # 同步阿里云oss文件到aws s3 2 import oss2 3 import boto3 4 import os 5 from boto3.s3.transfer import TransferConfig 6 7 8 9 # 阿里云OSS配置 10 aliyun_access_key_
阅读全文
摘要:在centos上使用yum安装rabbitmq-server rabbitmq及其依赖环境 rabbitmq安装之前需要安装socat,否则直接安装rabbitmq可能会报错 如果没有找到,则先安装epel源 yum -y install epel-release yum install socat
阅读全文
摘要:1.安装pillow模块 (1)创建图片 运行程序,程序会在py文件的同级下生成一个名为"pic.png"的小图片,图片长为400px,宽为400px,颜色为白色 (2)创建笔画 验证码实例
阅读全文
摘要:#日志记录到多文件示例 #日志记录到单个文件示例 #只创建一个实例的设计模式 cls为类名
阅读全文
摘要:1 import paramiko,os,sys 2 3 4 host_dic = { "10.10.154.77":"s1", 5 "10.10.83.96":"s2", 6 "10.10.39.70":"s3", 7 "10.10.46.120":"s4", 8 "10.10....
阅读全文
摘要:1 import threading 2 import socket 3 import time 4 def conn(): 5 cli = socket.socket() 6 cli.connect(("58.68.232.139",80)) 7 while True: 8 data = input(">>>").strip() 9 ...
阅读全文
摘要:1.时间模块 time 2.random模块 生成随机字符 3.shutil 模块 复制,删除,打包压缩 4.hashlib 模块 可以用来校验文件一致性 5. logging 模块
阅读全文