无法编译引入了wxPython的源码

错误提示:

" This program needs access to the screen.Please run with a Framework build of python, and only when you are logged in on the main display of your mac."

原因分析:

Anaconda is not a Framework build of python.

解决方法:
you should be able to still run the program using "pythonw" which runs python with the correct options to run the GUI.It should be on your PATH

pythonw simple.py

编译时提示ascii错误

错误提示

"SyntaxError: Non-ASCII character '\xe4' in file"

原因分析

源码中使用了中文注释,导致编码问题

解决方法
在源码第一句加入如下代码,必须是第一句

# -*- coding: utf-8 -*-
最后由 oucb 编辑于2016年05月04日 13:10