文章分类 -  Python第三方模块

摘要:import PILfrom PIL import Image, ImageDraw, ImageFont, ImageFilterimport random#随机字母def rndChar(): return chr(random.randint(65,90))#随机颜色def rndColor( 阅读全文
posted @ 2019-08-07 13:50 桑铎是大叔 阅读(202) 评论(0) 推荐(0)
摘要:一、下载 pip3 install retry 二、使用 三、参数 阅读全文
posted @ 2019-08-06 11:59 桑铎是大叔 阅读(437) 评论(0) 推荐(0)
摘要:一、下载 pip3 install tqdm二、使用import timeimport tqdm# 方法1# tqdm(list)方法可以传入任意list,如数组for i in tqdm.tqdm(range(100)): time.sleep(0.5) pass# 或 string的数组for 阅读全文
posted @ 2019-08-06 11:35 桑铎是大叔 阅读(1417) 评论(0) 推荐(0)
摘要:一、安装 pip3 install paramiko 二、连接方式 1、传统方式 2、基于用户名密码transport方式登录 3、基于公钥秘钥连接 三、上传put下载get 阅读全文
posted @ 2019-08-02 16:20 桑铎是大叔 阅读(402) 评论(0) 推荐(0)
摘要:一、下载 pip3 install requests 二、语法 1、get请求 request.get('url','params',kwargs) A、基本网站格式 request.get('url'.status_code) status_code:返回状态码 text:返回网页首页编码 con 阅读全文
posted @ 2019-08-02 11:43 桑铎是大叔 阅读(217) 评论(0) 推荐(0)
摘要:一、下载 pip3 install chardet# 检测编码工具 字符串越多越准确import chardetprint(chardet.detect(b'hello world!'))# {'encoding': 'ascii', 'confidence': 1.0, 'language': ' 阅读全文
posted @ 2019-08-02 10:31 桑铎是大叔 阅读(270) 评论(0) 推荐(0)
摘要:#!/usr/bin/env python# -*- coding:UTF-8 -*-#author:uncle sandorimport psutilimport datetimeimport time# 当前时间now_time = time.strftime('%Y-%m-%d-%H:%M:% 阅读全文
posted @ 2019-08-01 17:19 桑铎是大叔 阅读(174) 评论(0) 推荐(0)
摘要:一、安装psutil pip3 install psutil 用户 psutil.user 二、cpu cpu物理个数 psutil.cpu_count(logical=False) cpu逻辑个数 psutil.cpu_count() #默认logical=True cpu完整信息 psutil. 阅读全文
posted @ 2019-08-01 17:18 桑铎是大叔 阅读(418) 评论(0) 推荐(0)