![](https://img-blog.csdnimg.cn/20181113145857987.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
Python 高级编程知识点汇总
这里面都是关于python的知识点的总结,不懂得可以在下边评论
上海_彭彭
这个作者很懒,什么都没留下…
展开
-
企业微信机器人使用python上传文件并发送示例
def wx_post(file): id_url = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/upload_media?key=机器人key&type=file' # 上传文件接口地址 data = {'file': open(file, 'rb')} # post jason response = requests.post(url=id_url, files=data) # post 请求上传文件 json原创 2021-09-15 18:13:25 · 1853 阅读 · 0 评论 -
Python 连接SQLite数据库 及基础操作
# 1.连接数据库 conn = sqlite3.connect("test.db") #打开或创建数据库文件 print("Opened database successfully") # 2.创建数据表 conn = sqlite3.connect("test.db") #打开或创建数据库文件 print("成功打开数据库") c = conn.cursor() #获取游标 sql = ''' create table company (id int primary原创 2020-12-14 21:41:20 · 1092 阅读 · 0 评论 -
singledispatch实现不同类型的拼接(list,str,tuple,dict)
from functools import singledispatch @singledispatch def add(type): raise TypeError def appendFunc(fun): def validate(*type): args1,args2=type[:2] if type(args1) != type(args2): print("类型不同不能拼接") return fun(*typ原创 2020-12-03 23:30:43 · 138 阅读 · 0 评论 -
Python-log 利用getattribute自动输出 调用的方法或者属性log
class F(object): def __init__(self): self.name = 'A' def hello(self): print('hello') def __getattribute__(self, item): if item == "__dict__": return ...原创 2019-12-04 12:54:05 · 410 阅读 · 0 评论