04 2023 档案
摘要:多进程 import multiprocessing as mp import threading as td import time def job(q): res = 0 for i in range(10000000): res += i + i ** 2 + i ** 3 q.put(res
阅读全文
摘要:区别: xx:公有变量,所有对象都可以访问; __xxx__:双下划线代表着是系统定义的名字。 __xxx:双前置下划线,避免与子类中的属性命名冲突,无法在外部直接访问。代表着类中的私有变量名。 _xxx:单前置下划线,私有化属性和方法,类对象和子类可以访问。不能用“from module impo
阅读全文
摘要:简介 pyinstaller就是将python脚本打包成可执行文件exe 官方文档:https://pypi.org/project/pyinstaller/ 安装 pip install Pyinstaller pyinstaller 常用的命令: -F:仅仅生成一个文件,不暴露其他信息,启动较慢
阅读全文
摘要:四大库各自好用的地方 这里采用文字叙述为大家讲解这四大模块各自的用法,具体内容会在后面详细介绍。 1. os库 对于os模块来说,这是大家最熟悉的一个库,功能相对很齐全,主要像以下这些功能: os.getcwd():获取当前的工作路径; os.chdir() :改变当前工作目录到指定的路径; os.
阅读全文
摘要:wmi模块 import wmi w = wmi.WMI() for n in w.Win32_NetworkAdapter(): if n.MACADDress is None or n.PhysicalAdapter is False: continue mac = n.MACADDress n
阅读全文
摘要:制作gui 选项卡学习 #!/usr/bin/env python # -*- coding:utf-8 -*- # author:SunXiuWen # datetime:2023/02/10 """ https://iowiki.com/wxpython/wx_textctrl_class.ht
阅读全文
摘要:import config from Utils.ParseXmlUtil import check_string, check_open_ability_sign from Crypto import Random from Crypto.Hash import SHA256 from Crypt
阅读全文