python2.6处理中文乱码问题解决

May 06, 2009 10:31:17 AM

运行脚本,内有中文,出现错误

 

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)

 

解决方法: 

 

#coding=utf8
import sys
reload(sys)
sys.setdefaultencoding("utf-8")

 

 

 

Wxpython跨平台安装

Oct 27, 2008 12:22:41 AM

简介:wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWidgets cross platform GUI library, which is written in C++.

Like Python and wxWidgets, wxPython is Open Source which means that it is free for anyone to use and the source code is available for anyone to look at and modify. Or anyone can contribute fixes or enhancements to the project.

wxPython is a cross-platform toolkit. This means that the same program will run on multiple platforms without modification. Currently supported platforms are 32-bit Microsoft Windows, most Unix or unix-like systems, and Macintosh OS X.

Since the language is Python, wxPython programs are simple, easy to write and easy to understand. Here is an example.

How to Learn wxPython

在Ubuntu平台上安装指南

wiki.wxpython.org/InstallingOnUbuntuOrDebian