
Python
文章平均质量分 52
好多鱼哦
数据挖掘、机器学习
展开
-
Python中文编码问题
想必使用Python的朋友都遇到过字符串乱码的问题,记一下吧。 字符串在Python内部的表示是unicode编码,因此,在做编码转换时,通常需要以unicode作为中间编码,即先将其他编码的字符串解码(decode)成unicode,再从unicode编码(encode)成另一种编码。原创 2016-05-19 23:03:34 · 277 阅读 · 0 评论 -
Python线程使用
一般创建threading.Thread的子类来包装一个线程对象 import threading import time class timer(threading.thread): def __init__(self,num,interval): thredaing.thread__init__(self) self.thread_num = num self.interval原创 2016-08-12 21:50:24 · 339 阅读 · 0 评论