wxPython - how to import the wx.adv module?

时光总嘲笑我的痴心妄想 提交于 2021-01-28 03:20:37

问题


Trying to work with wx.adv according to http://wxpython.org/Phoenix/docs/html/adv.1classindex.html But I'm getting "ImportError: No module named adv".

Is there an installer or a special way to import it? Is it deprecated...?

Using Windows and Mac, Python 2.7.6, wxPython 3.0.


回答1:


Is it possible you think you have Phoenix/are running Phoenix, but are in fact not?

Try on the command line (sorry, tested on windows, but should apply to Mac too):

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'2.9.5.0 msw (classic)'

as opposed to

'3.0.1.dev76380 msw (phoenix)'

in a virtualenv with 2.7.6 and Phoenix. Which class do you want to use? As stated, wx.adv is Phoenix, classic does not have wx.adv out of the box and the things may be in other places.



来源:https://stackoverflow.com/questions/27102834/wxpython-how-to-import-the-wx-adv-module

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!