Closed karlmattsmith closed 7 years ago
Also includes using PyQt5 (which requires Python 3.x) if available; otherwise back to PyQt4.
I am going to add this in and then fix anything that this might break in Python 2.x There are still some includes in the pipedviewer (pviewmod) that need to be fixed for Python 3.x
Mostly 2to3 updates, but also inspected to keep code unchanged for 2.6, 2.7 builds. The from future import print_function added to deal with that huge difference; otherwise using compiler directive
#if PY_MAJOR_VERSION > 2
for incompatible differences (for PyString... to PyUnicode... and PyInt... to PyLong...). Some changes to import statements that still need to be checked under 2.x. Change fromxrange
torange
left in for 2; might be slower but hopefully optimization under 2.x will translate that back.Also updated C code interface with NumPy - largely switching to PyArrayObject, and insert
_ARRAY
into some flags. Since this is applicable to current NumPy under 2.6, 2.7, these changes should be okay in all versions.