I'm finally disentangled from Python 2, thank you everyone

Chris Green cl at isbd.net
Tue Dec 29 16:20:17 EST 2020


Well, it has taken me a while, but I now seem to have finally detached
myself from any Python 2 dependencies on my various systems.

Firstly may I say thank you to everyone who has helped me with this
(and with other issues) here on the Python list, you are a friendly
and helpful group of people.

I run (mostly) xubuntu systems and, as of xubuntu 20.04 Python 2
should have gone.

First I changed all of my code to use Python 3, this was mostly pretty
trivial (like my code in many ways!), the only slightly difficult
areas were the changes to Gtk and the string->bytes thing which I had
a problem with but, with help from here, was sorted fairly easily.

As regards installed software on my laptop it was easy, I don't quite
know when it all went but I didn't have to do anything, the current
xubuntu 20.10 installation has no Python 2 on it at all.

On my desktop machine it was a bit more difficult because of the Oki
scanner utility which I have asked about quite a lot here.  It has a
.so file built for Python 2 which I couldn't convert.  In the end
(following ideas from here) I have packaged it using cx-freeze so that
the utility and all the libraries etc. that it needs are run 'as a
package' with all the old Python 2 dependencies inside the package. It
took me a while to get it all packaged but it is now done and the
utility runs successfully on my desktop which is 'Python 2 free'
(except of course for files within the Oki utility package).

Phew! :-)


... and thanks again for all the help and support here.

-- 
Chris Green
·


More information about the Python-list mailing list