Add Python 3 support to the Python test.py script.
The print function is used in place of the print statement.
The urlopen function has been moved to urllib.request in Python 3, so
attempt to import it from either location.
TestCase.assert_() has been deprecated in place of
TestCase.assertTrue().
The tests all pass in both Python 2 and 3.
Build the Python 3 cv2 module in lib/python3/, to avoid potential naming
conflicts with the Python 2 bindings.
The Python 2 bindings are placed directly in lib/, where they are
required for the Buildbot to successfully execute the Python tests.
The documentation states, that a NULL or an empty window name can be used
to refer to the control panel. But the string parameters of the C++ frontend
methods cannot be NULL and converting an empty string to a const char* by
c_str() doesn't produce a NULL pointer, but an empty string. Unfortunately,
the const char* pointer is just passed on to the standard C functions in
the QT backend, which doesn't check for the empty string case.
There are two places where the empty string check could have been introduced:
inside the frontend or inside the backend. As long as the documentation only
mentions this as a special case for the QT backend, the best place seems to
be there.
Place the built Python module library in a dedicated folder inside of
lib/. This ensures that even if the Python 2 and Python 3 module names
conflict, they will not overwrite one another.