![](https://img-blog.csdnimg.cn/direct/3bb1bc14bbea4a728e70d8552110d56f.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
Python
Python
Carpe_yj_Diem
这个作者很懒,什么都没留下…
展开
-
Python将.py文件打包成.exe可执行文件
1.安装Pyinstaller库,pip install pyinstaller2.在.py文件的所在文件夹Shift+右键,打开后输入pyinstaller -F 要打包的文件名称(例如Mqtt.py),-F参数表示覆盖打包,如果有旧的会覆盖打包后的exe文件在dist文件内...原创 2021-10-29 16:27:51 · 195 阅读 · 0 评论 -
Python 读取某个目录下所有png图片导入Excel
一、安装xlsxwriter库pip3 install xlsxwriter二、代码import xlsxwriter, osimage = []# 打包前路径:os.path.abspath(__file__)# 打包后路径:os.path.realpath(sys.executable))# 获取文件目录下所有的.png图片def GetImgPathFromFolder(): for root, dirs, files in os.walk(os.path.dirna原创 2022-04-28 17:23:29 · 2060 阅读 · 0 评论