Search code examples
wxpython

wxPython - how to import the wx.adv module?


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.


Solution

  • 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.