python抓网页中文乱码问题
摘要:import urllib2import syscontent = urllib2.urlopen("http://www.higis.cn").read() #网站页面是utf-8编码的。type = sys.getfilesystemencoding() # 关键print content.decode("UTF-8").encode(type) # 关键
阅读全文
posted @
2010-05-27 16:40
jerry data
阅读(4537)
推荐(1)
py2exe
摘要:1, download py2exe http://nchc.dl.sourceforge.net/sourceforge/py2exe/py2exe-0.6.9.win32-py2.5.exe 2, setup.py from distutils.core import setup import py2exe setup(windows=['start.py']) # win...
阅读全文
posted @
2009-01-02 03:46
jerry data
阅读(262)
推荐(0)
PyQt
摘要:1, Qt Designer 2, pyuic4 *.ui 3, # start.py import sys from PyQt4 import QtCore, QtGui from edytor import * app = QtGui.QApplication(sys.argv) window = QtGui.QMainWindow() ui = Ui_mainWindow(...
阅读全文
posted @
2009-01-02 03:42
jerry data
阅读(207)
推荐(0)