"> ');
2024/10/19

Python-EXCEL工作表保护密码破解

需要安装openpyxl 库 可以使用以下命令通过阿里云源安装,速度比较快:pip install openpyxl -i https://mirrors.aliyun.com/pypi/simple/ import openpyxl # 文件路径 file_path = r'替换成你本地需要…

  • python
  • 2024/10/19
  • 11
  • 2024/8/19

    python,读取文件解析,写入数据库

    最近在网上下载到了,qq绑定手机号的数据,试着写入数据库中 import json import mysql.connector file_path = r'D:\tens\tencent.txt' # 数据库连接 db = mysql.connector.connect( host="192.168.1…

  • python
  • 2024/8/19
  • 2,201
  • 2024/1/20

    python-文件夹名批量替换特定字符

    源码 import os def replace_letter_in_folder_names(root_dir, old_letter, new_letter): for dirpath, dirnames, filenames in os.walk(root_dir, topdown=True): if dirpath == root_d…

  • python
  • 2024/1/20
  • 2,063
  • 2024/1/20

    python-文件名批量替换特定字符

    源码 """ 这个Python脚本用于批量重命名指定目录及其子目录中的文件。 它会遍历指定的根目录(不包含子目录),查找所有包含旧字符串的文件名,并将这些文件名中的旧字符串替换为新字符串。 使用方法: …

  • python
  • 2024/1/20
  • 1,850