随笔分类 -  Python 小记

python 第三方包大全
摘要:https://www.lfd.uci.edu/~gohlke/pythonlibs/ http://mirrors.aliyun.com/pypi/simple 阅读全文

posted @ 2022-07-29 10:12 fengZQ 阅读(100) 评论(0) 推荐(0) 编辑

python bottle小记
摘要:# coding=utf-8import bottle @bottle.route('/url/url', method=['GET','POST'])def big_data(): # 获取请求参数 trans_user_type = bottle.request.GET.get('trans_u 阅读全文

posted @ 2022-06-30 09:58 fengZQ 阅读(24) 评论(0) 推荐(0) 编辑

flash 学习笔记
摘要:一、安装环境 1. 查看是否安装了virtualenv virtualenv --version 2. 安装虚拟环境 pip install virtualenv pip install virtualenvwrapper 3. 若提示找不到mkvirtualenv命令,需配置环境变量 1)创建目录 阅读全文

posted @ 2021-04-09 15:32 fengZQ 编辑

pyton3 字典排序
摘要:1. 字典排序 d={'a':1,'c':3,'b':2} d1={k:d[k] for k in sorted(d)} 阅读全文

posted @ 2020-10-09 09:46 fengZQ 阅读(59) 评论(0) 推荐(0) 编辑

python分包存放java堆栈信息
摘要:# coding=utf-8 import os import time path = os.getcwd() index = 0 while True: # 当前时间戳 timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) 阅读全文

posted @ 2020-06-10 19:49 fengZQ 阅读(217) 评论(0) 推荐(0) 编辑

python 返回当前文件夹下的所有文件的绝对路径;打印文件中的中文字符
摘要:# coding=utf-8 import re import os path = os.path.abspath('.') def all_path(dirname): result = [] for maindir, subdir, file_name_list in os.walk(dirna 阅读全文

posted @ 2020-03-31 14:37 fengZQ 阅读(608) 评论(0) 推荐(0) 编辑

python 虚拟环境及项目快速迁移
摘要:一、是否安装了virtualenv:virtualenv —version 二、安装虚拟环境: pip install virtualenvpip install virtualenvwrapper 三、配置 virtualenv:1. mkdir $HOME/.virtualenvs 2. vim 阅读全文

posted @ 2020-03-19 10:22 fengZQ 阅读(651) 评论(0) 推荐(0) 编辑

python3 解决bytes转str时抛“UnicodeDecodeError”异常
摘要:1. 修改字符集参数,一般这种情况出现得较多是在国标码(GBK)和utf8之间选择出现了问题。 2. 出现异常报错是由于设置了decode()方法的第二个参数errors为严格(strict)形式造成的,因为默认就是这个参数,将其更改为ignore等即可。例如: b"\xac\xed\x00\x05 阅读全文

posted @ 2020-02-21 10:18 fengZQ 阅读(883) 评论(0) 推荐(0) 编辑

python 日期运算
摘要:import datetime timeNow = datetime.datetime.now() # 当前日期 today = timeNow.strftime('%Y%m%d%H%M%S') # 昨天 yesterday = (timeNow - datetime.timedelta(days=1)).strftime('%Y%m%d%H%M%S') # 二十天前 twentyDaysAg... 阅读全文

posted @ 2019-02-20 17:50 fengZQ 阅读(2660) 评论(0) 推荐(0) 编辑

python项目在不同PC间环境迁移
摘要:https://www.cnblogs.com/zelos/p/7439599.html 阅读全文

posted @ 2019-02-20 11:07 fengZQ 阅读(960) 评论(0) 推荐(0) 编辑

requests模块上传文件
摘要:files = {'file': open('test11.log', 'rb')}res = requests.post( url, data={ 'key1': value, 'key2': value, 'key3': value }, files=files) 阅读全文

posted @ 2018-11-27 19:25 fengZQ 阅读(429) 评论(0) 推荐(0) 编辑

Python-文件和文件夹的移动、复制、删除、重命名
摘要:转自:http://blog.csdn.net/woshisangsang/article/details/74360612 阅读全文

posted @ 2018-03-09 09:31 fengZQ 阅读(43492) 评论(0) 推荐(1) 编辑

Python Excel及setuptool安装
摘要:1. 安装openpyxl模块 pip install openpyxl 2. 代码 获取最大行列值 print(table.max_row)print(table.max_column) 参考: https://www.cnblogs.com/sun-haiyu/p/7096423.html xl 阅读全文

posted @ 2018-02-07 15:54 fengZQ 阅读(444) 评论(0) 推荐(0) 编辑

Python 异常处理——处理默认错误类型以外错误
摘要:Python 异常处理之处理默认错误类型以外错误 阅读全文

posted @ 2018-01-04 15:02 fengZQ 阅读(850) 评论(0) 推荐(0) 编辑

Python 编程(小试水)
摘要:一. Python 冒泡法排序def sequence(arrays=list()): def desc(): for i in range(1, len(arrays)): for j in range(len(arrays) - i): if arrays[j] arrays[j + 1]: ... 阅读全文

posted @ 2017-12-11 22:37 fengZQ 阅读(317) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 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 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示