- 博客(8)
- 收藏
- 关注
原创 demo
import tkinter as tkfrom tkinter import ttk‘’‘松耦合’’’弹窗class MyDialog(tk.Toplevel):def init(self, phase):super().init()self.title(‘Unit Test’)# 弹窗界面self.phase = phaseself.setup_UI()def setup_UI(self):WIDTH = 300HEIGHT = 150screenwidth = self.w
2022-03-18 10:17:11 4022 1
原创 Python3 设计模式
序# 使用抽象基类,来规定子类的接口from abc import ABCMeta, abstractmethodclass Payment(metaclass=ABCMeta): @abstractmethod def pay(self, money): passclass Alipay(Payment): def pay(self, money): print('支付宝支付{}元'.format(money))class We
2021-12-26 16:34:03 195
原创 Python multiprocessing 多进程
1. Pool()实例化必须在 main函数中原因:保护进程和子进程不会陷入pickle死循环参考:python - multiprocessing pool example does not work and freeze the kernel - Stack Overflowhttps://stackoverflow.com/questions/52693216/multiprocessing-pool-example-does-not-work-and-free...
2021-11-22 18:46:41 474
原创 mysql语句
1. 连接查询 -- 选择小表放右侧,作为驱动表,以提高性能 -- tb_college是小表,tb_student是大表 select tb_student.stu_name, tb_college.col_name from tb_student, tb_college where tb_student.stu_id = tb_college.stu_id;...
2021-09-27 17:39:42 128
原创 python xlwings vba api
常用api# sht对象:# 搜索range_obj = sht.api.Cells.Find(What='Tofind_str', After=sht.api.Cells(1, 1), LookAt=xlwings.constants.LookAt.xlWhole, LookIn=xlwings.constants.FindLookIn.xlFormulas,
2021-09-17 14:29:43 655
原创 pyhon *运算 深浅拷贝
# coding=utf-8# 定义一个数组x = [1, 2, 3]# 拷贝x 3次y = [x*3] # y = [[1, 2, 3], [1, 2, 3], [1, 2, 3]]# 修改其中一个元素y[0][0] = 4# 三行都变了 y = [[4, 2, 3], [4, 2, 3], [4, 2, 3]]# 避免方法y = [x[:] for i in range(3)]...
2021-09-15 16:23:10 67
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人