随笔分类 -  日常Python小应用

摘要:import requests from requests.auth import HTTPBasicAuth def get_token(): """ 获取 token 的逻辑 """ url = "https://devxxxxxxxxtion/v2/token" # 替换为实际的 token 阅读全文
posted @ 2024-11-07 10:24 安琪儿一直在 阅读(73) 评论(0) 推荐(0) 编辑
摘要:import csvdef compare_csv(file1, file2): # 读取第一个CSV文件 with open(file1, 'r') as f1: csv1 = csv.reader(f1) data1 = [row for row in csv1] # 读取第二个CSV文件 wi 阅读全文
posted @ 2024-03-15 16:46 安琪儿一直在 阅读(255) 评论(0) 推荐(0) 编辑
摘要:import os# os.listdir()方法获取文件夹名字,返回数组def getAllFiles(targetDir): listFiles = os.listdir(targetDir) return listFilesfiles = getAllFiles(r"E:\UEtest\sla 阅读全文
posted @ 2023-06-26 16:45 安琪儿一直在 阅读(274) 评论(0) 推荐(0) 编辑
摘要:import osimport sysdirname = "C:/Users/admin/Desktop/二维引擎"# 判断文件夹dirname是否存在if not os.path.exists(dirname): print("error: folder \"", dirname, "\" not 阅读全文
posted @ 2023-06-26 16:41 安琪儿一直在 阅读(459) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示