|
初学请帮忙看看
1.安装python-2.5.msi 目录c:\python25
2.安装wxPython2.8-win32-ansi-2.8.7.1-py25.exe 目录C:\Python25\Lib\site-packages
我看官方还有个wxPython2.8-win32-unicode-2.8.7.1-py25.exe文件,这两个文件有啥区别?
在windows2000服务器版本下建立文件ddd.py内容如下:
from wxPython.wx import *
class MyApp (wxApp):
def OnInit (self):
frame = wxFrame (NULL, -1, "Hello from wxPython")
frame.show (true)
self.setTopWindow (frame)
return true
app = MyApp (0)
app.Mainloop ()
怎么就出现几行英文后一闪窗口就不见了?
显示内容如下:
F:\ddd.py:1: DeprecationWarning: The wxPython compatibility package is no longer
automatically generated or actively maintained. Please switch to the wx packag
e as soon as possible.
from wxPython.wx import *
Traceback (most recent call last):
File "F:\ddd.py", line 1, in <module>
from wxPython.wx import *
File "C:\Python25\Lib\site-packages\wx-2.8-msw-ansi\wxPython\__init__.py", lin
e 15, in <module>
import _wx
File "C:\Python25\Lib\site-packages\wx-2.8-msw-ansi\wxPython\_wx.py", line 8,
in <module>
from _misc import *
File "C:\Python25\Lib\site-packages\wx-2.8-msw-ansi\wxPython\_misc.py", line 4
56, in <module>
wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear
AttributeError: 'module' object has no attribute 'DateTime_GetNumberOfDaysinYear
'
是不是wx包不对啊? |
|