09 2021 档案

摘要:方法:重写Thread类,在类中添加一个flag判断子线程是否出现异常 import threading import traceback class ExcThread(threading.Thread): def __init__(self, target, args, kwargs): sup 阅读全文
posted @ 2021-09-28 10:44 一笔一划82 阅读(422) 评论(0) 推荐(0)
摘要:app.py文件 创建项目、设置路由、启动项目 from flask import Flask from flask_restful import Api from concurrent.futures import ThreadPoolExecutor executor = ThreadPoolE 阅读全文
posted @ 2021-09-27 08:44 一笔一划82 阅读(76) 评论(0) 推荐(0)
摘要:import pandas as pd # 先装个pandas ,pip install pandas import pymysql # 读入数据库 filename = 'student.xlsx' # 本地需要导入数据库的文件 data = pd.read_excel(filename) # 建 阅读全文
posted @ 2021-09-16 11:42 一笔一划82 阅读(485) 评论(0) 推荐(0)
摘要:使用openpyxl库 from openpyxl import Workbook import pymysql con = pymysql.connect(host="127.0.0.1", port=3306, user="root", passwd="***", db="student",ch 阅读全文
posted @ 2021-09-16 11:00 一笔一划82 阅读(83) 评论(0) 推荐(0)
摘要:logging模块 import logging logging.basicConfig(level=logging.DEBUG, format="%(message)s %(asctime)s",datefmt="%Y-%m-%d %H:%M:%S") #level:日志报错级别 format:日 阅读全文
posted @ 2021-09-15 17:22 一笔一划82 阅读(53) 评论(0) 推荐(0)