摘要: # 三种写入文件测试 import os txt = 'hello \nworld' file = '../demo.txt' # dir = os.path.dirname(file) # 如果路径中有不存在的子文件夹则创建 # if not os.path.exists(dir): # os.m 阅读全文
posted @ 2025-01-07 15:03 nxhujiee 阅读(14) 评论(0) 推荐(0)
摘要: # python程序打包工具 # 注:需要事先安装pyinstaller库并且保证能够正常运行。 ## -*- coding: utf-8 -*- # 选择需要打包的py代码文件后将打包的exe文件输出到当前路径 from os import system, remove, getcwd from 阅读全文
posted @ 2025-01-07 00:03 nxhujiee 阅读(33) 评论(0) 推荐(0)