07 2022 档案
下载pdfplumber 时出错
摘要:错误信息: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /pack
更新pip报错
摘要:错误信息:无法将“D:\PyCharm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 解决方法:更换阿里云镜像源,添加 --trusted-host mirrors.aliyun.com python -m pip inst
按要求数目分行
摘要:from math import ceildef split_word(lst, size): word_list = list( map(lambda x: lst[x * size:x * size + size], list(range(0, ceil(len(lst) / size)))))
读取压缩文件,翻译后重新压缩
摘要:'''一:需求:读取压缩包,根据客户要求,查看是否有用户要求的文件,如果没有,则放弃这个压缩包,如果有则解压这个压缩包,打开特定文件,对其中的某些字段进行翻译并重写,然后重新压缩二:需求分析:1.编写配置文件,方便用户配置需要翻译的文件及字段2.编写翻译程序,输入一个压缩包,输出一个翻译后的压缩包三
json文件单引号变双引号
摘要:def Single_to_double_quote(path): fileObject = open(path, 'r', encoding='utf-8').read() dels = fileObject.replace('\'', '\"') open(path, 'w', encoding