Search code examples
pythonwxpython

Missing classes in wxPython


In the documentation of wxPython there are some classes that are missing.

For example: TextCompleter. But in python I get:

>>> import wx
>>> print wx.__version__
2.9.3.1
>>> from wx import TextCompleter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name TextCompleter

I have also tried with the newest version of wxPython (3.0)


Solution

  • As you may have noted, you are referring to the wxPython (Phoenix) documentation. You however have the classic version installed, where TextCompleter has not been wrapped in SWIG (and probably never will, because development effort is concentrated on Phoenix). This class has been wrapped in Phoenix. If you are absolutely interested in trying out Phoenix, set up a virtualenv and pip install <path-to-wheel> a snapshot build. Do yourself a favor and download the wheel matching your python to local disk before trying to install the .whl-file.