pip install安装SSL错误,Could not fetch URL https://pypi.python.org/simple/python-docx/: There was a problem confirming the ssl certificate:
摘要:pip安装报SSL错误 pip3 install python-docx 解决方法 pip3 install python-docx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
阅读全文
posted @
2021-12-14 09:47
studyAppStore
阅读(149)
推荐(0)
Python Yaml 写入中文乱码的问题(allow_unicode=True)
摘要:def set_testdata(testdata, ymlname="capst.yml"): curpath = os.path.dirname(os.path.realpath(__file__)) yamlpath = os.path.join(curpath, ymlname) # 写入到
阅读全文
posted @
2020-09-30 14:09
studyAppStore
阅读(1311)
推荐(0)
python批量删除mysql数据
摘要:1.格式:外面用"",里面用''否则执行无效例子:"DELETE FROM users WHERE username = 'hixiuy'" 2.批量模糊删除:含中文的用 binary 例子:"DELETE FROM users WHERE binary username LIKE '%秋%' OR
阅读全文
posted @
2020-09-29 10:41
studyAppStore
阅读(732)
推荐(0)
fiddler打开时,pycharm运行报SSL错误
摘要:python3访问HTTPS时移除SSL认证 r = requests.get(url, verity=False) 移除警告https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings import urllib
阅读全文
posted @
2020-09-27 13:57
studyAppStore
阅读(657)
推荐(0)
python 将unicode编码转换为汉字的几种方法
摘要:str = '\u4eac\u4e1c\u653e\u517b\u7684\u722c\u866b' 方法1:使用unicode_escape str.encode().decode("unicode_escape") print(str) # 总结:str.encode() 把字符串转换为其raw
阅读全文
posted @
2020-09-09 14:36
studyAppStore
阅读(1974)
推荐(0)
Python使用content.encode("utf-8").decode("unicode-escape")导致中文乱码的解决方法
摘要:当想要把一个字符串中的\u002F这样的字符串转成正常字符串时,如果字符串中存在中文字符,将导致中文被转成乱码。例如: content = "\\u002F哈哈" content = content.encode("utf-8").decode("utf-8") ==> \u002F哈哈 无法进行转
阅读全文
posted @
2020-09-09 12:01
studyAppStore
阅读(2591)
推荐(0)
Python--01
摘要:01 basic.py # coding:utf-8 编码格式为utf-8 # 单行注释 Ctrl+/ ''' 多行注释 a = 12 b = '你好' c = 3.4 print("%s,总共%d,那么c=%f"%(b,a,c),end='\t') a = int(input("请输入结果:"))
阅读全文
posted @
2019-09-26 15:09
studyAppStore
阅读(187)
推荐(0)