On Sun, 8 Apr 2018, Norbert Lange wrote:
Maybe it's also worth including a trival wrapper script to set
PYTHONPATH suitably and then exec python.
Is there a good reason why you are making it harder than necessary to
use python-wxgtk4.0 ?
Because wxPython 3.0 already exists for Python 2 as module "wx". But
wxPython 3.0 doesn't support Python 3 and never will, so there's no
other claimant for module "wx" for Python 3.
wxPython 4.0 is pretty much a from-the-ground-up rebuild and isn't
completely compatible with wxPython 3.0, so switching "import wx" to use
that for Python 2 would not work out well.
its not entirely incompatible either, as right now I only get deprecation
warnings on code that was written for wxPython 3.0.
The code you're running must not use any of the changed APIs. See here
for some of the changes:
https://github.com/wxWidgets/Phoenix/blob/master/docs/classic_vs_phoenix.rst
Python 2 is fully supported by Debian during the lifetime of buster,
and there are various reasons why many users are stuck with Python 2
for some more time.
There are, but people sticking with Python 2 are really unlikely to want
to use wxPython 4.0.
Sticking to Python2 is not the reason, no. The argument would be to
use wxPython 4.0,
and have it painlessly run on current systems and with packages
that aren't yet ported to python3.
without wxPython 4.0 on python2, you have to stick to wxPython 3.0,
and either bet on upwards compatibility or test on both libraries.
There really isn't much of a reason to use wxPython 4.0 though, other than
for Python 3 support. That's really the only major enhancement over
wxPython 3.0. Both wxPython 3.0 and wxPython 4.0 are python bindings for
wxWidgets 3.0. wxPython 4.0 just has a slightly different API in some
cases.
Personally I would prefer a mutual-exlusive installation or
an update-alternatives scheme as sym-linking the wx folder did work for me.
We can't break any existing wxPython 3.0 applications though. I suppose
we could do an update-alternatives scheme, but wxPython 3.0 would have the
higher priority to avoid breaking any applications. So, it would really
only be useful if wxPython 4.0 was the only one installed.
Scott