摘要:
问题描述 1.安装python3 2.搭建python3开发环境 PS:经检验在退出deactivate前执行的进程,在退出后会继续执行 阅读全文
随笔分类 - 2.1.├─ .Python
python 将带表情符的数据插入到mysql
2018-07-13 09:38 by LI桥IL, 1645 阅读, 收藏, 编辑
摘要:
问题描述 1.修改mysql server step1:/etc/my.cnf修改 step2:执行修改数据库和表、字段的字符集sql step3:重启mysql服务 2.确认mysql驱动、连接串 我这里用的是python插入数据,经检查Mysql-python模块不支持utf8mb4字符,需要卸 阅读全文
python 去除不可见字符
2018-07-05 11:23 by LI桥IL, 7314 阅读, 收藏, 编辑
摘要:
line.strip().strip(b'\x00'.decode()) _line.strip().strip(b'\x00'.decode()).strip(b'\xef\xbb\xbf'.decode()).split(',') line.decode('gb2312', 'ignore').encode('utf8') 阅读全文
xml元素定位
2016-05-03 10:48 by LI桥IL, 683 阅读, 收藏, 编辑
摘要:
1 #-*- coding: UTF-8 -*- 2 import sys 3 import lxml 4 import lxml.etree,StringIO 5 6 reload(sys) 7 sys.setdefaultencoding('utf-8') 8 9 10 def getxml_xpth_content(xpath,filepath,index=0): ... 阅读全文