![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
teder
这个作者很懒,什么都没留下…
展开
-
python的编码问题
#coding:utf-8当前文件的编码格式 字符串在python内部是unicode存在的 unicode-->GBK编码 s.encode("GBK") GBK-->unicode 解码 s.decode("GBK") MySQLdb.connect(host="ip",user="user",passwd="ps",db="db"2009-06-08 19:53:51 · 78 阅读 · 0 评论 -
python 实用技巧
python 连接GBK mysql数据库 #!/usr/bin/python #coding:utf-8 import MySQLdb fconn = MySQLdb.connect(host='freeshop.dbm.hz1.koubei.com',user='freedian',passwd='8129927@freedian',db='freedian',charset=...原创 2011-06-20 13:39:16 · 80 阅读 · 0 评论