Robin, how exactly should I use wx.lib.six to migrate wx.lib.softwareupdate to Python 3.x?
Let's move this and your other Phoenix discussions to wxPython-dev, they are probably more appropriate there, at least until Phoenix is ready for more general use.
Bo�tjan Mejak wrote:
Robin, how exactly should I use wx.lib.six to migrate
wx.lib.softwareupdate to Python 3.x?
At a minimum you can use the PY3 value to know which version of Python is running and use it to conditionally choose Py3-only or Py2-only code.
from wx.lib import six
...
if six.PY3:
doSomething()
else:
doSomethingElse()
But there is a whole lot more in there that helps smooth out the bumps in code that needs to be runnable in both, including handling cases where classes or modules in the stdlib have moved or changed names, and some of the differences in string and integer types, etc. Read the docs and the code to learn more.
···
--
Robin Dunn
Software Craftsman