Python 2 to Python 3 .so library incompatibility - need help

Chris Angelico rosuav at gmail.com
Wed Dec 16 17:18:51 EST 2020


On Thu, Dec 17, 2020 at 9:06 AM Chris Green <cl at isbd.net> wrote:
> > Also, make note of the specific Python 2 version where your software
> > works - the CPython API does change somewhat sometimes.
> >
> I still have python 2.  The issue is that the programs need modules
> which come from a PPA to support Python GTK, these conflict with
> ongoing updates to Python.  The PPA works OK in Ubuntu 20.04 but
> prevents some updates in 20.10.  I expect it will get worse as time
> goes on.
>

Try getting JUST the printer info in Python 2, and then outputting
that to stdout in JSON format. Then your Python 3 script can run your
Python 2 script, read what it sends on stdout, and do whatever it
needs to.

ChrisA


More information about the Python-list mailing list