![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Allenshen2533
这个作者很懒,什么都没留下…
展开
-
自定义双引号字典
自定义双引号字典import jsonclass mydict(dict): def __str__(self): # 显示对象的字符串形式 return json.dumps(self, ensure_ascii=False).replace(" ", "") def __repr__(self): # 显示对象属性 print('my name is {}'.format(self.keys())) return 'haha' #原创 2021-01-26 17:45:29 · 136 阅读 · 0 评论 -
A Simple Werkzeug Application
**## a simple werkzeug application**```python# /usr/bin/env python# -*- coding=utf-8 -*-"""Created on 2021/1/19 19:28@author: allensehn2533@desc: a simple werkzeug application"""import osimport redisfrom urllib.parse import urlparsefrom we原创 2021-01-21 14:43:56 · 168 阅读 · 3 评论 -
python批量生成excel测试数据
没啥说的,直接上代码。。。#!/usr/bin/env python3-- coding: utf-8 --import xlwtimport timeimport randombook = xlwt.Workbook(encoding=‘utf-8’)sheet = book.add_sheet(‘sheet1’, cell_overwrite_ok=True)row_col_l...原创 2019-09-01 21:01:41 · 816 阅读 · 0 评论 -
python logging模块用法
talk is cheap,show me the code.import loggingimport logging.handlerslogger = logging.getLogger("logger")handler1 = logging.StreamHandler()# handler2 = logging.FileHandler(filename="test.log", e...原创 2019-09-01 21:14:36 · 185 阅读 · 0 评论