![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
weixin_45833470
这个作者很懒,什么都没留下…
展开
-
cannot schedule new futures after interpreter shutdown
cannot schedule new futures after interpreter shutdown我这次报错原因是写的一个demo,运行很快就结束了导致的,所以应该加一个死循环,不让主线程挂掉原创 2021-04-07 17:05:49 · 8504 阅读 · 0 评论 -
emailgun一个请求批量发送邮件
个人封装的一个批量发送动态内容的方法 def send_multiple_message(self): """批量发送""" # 模板填充内容 with open(self.template.template, encoding='utf-8') as f: content = f.read().replace('\n', '').replace('\r', '').replace('\r\n', '') year = datetime.now()原创 2021-03-26 14:51:32 · 478 阅读 · 0 评论 -
python 注意元组与list
def __init__(self, app, emails, template) -> None: self.app = app self.emails = emails self.template = template def __init__(self, app, emails, template) -> None: self.app = app self.emails = emails, ...原创 2021-03-26 11:19:53 · 70 阅读 · 0 评论 -
面向对象的一些东西
以python代码为例,与他人交流后的一些想法,先重构一个自己以前写的代码.重构前代码, 业务逻辑写在了一起,被评价为 脚本def sync_record_hourly(): # 获取post过来的文件名称,参数中获取,指定name为file upload_files = request.files.getlist('file') if not upload_files: return {"code": 500, "err": "Please upload the原创 2021-03-24 16:17:19 · 67 阅读 · 0 评论 -
python设置等分函数
设置等分函数#listTemp 为列表 平分后每份列表的的个数ndef func(listTemp, n): for i in range(0, len(listTemp), n): yield listTemp[i:i + n]我记录他人的,但是我不记得是谁的了原创 2021-03-24 15:38:08 · 261 阅读 · 0 评论 -
python启动一个简易web服务
python -m http.server --bind 0.0.0.0 8080在当前文件夹作为资源文件目录启动一个python web服务器原创 2021-03-24 15:36:05 · 205 阅读 · 0 评论