<div dir="ltr">I'm planning to merge the py3k branch later today (around 4pm or so ET). This is going to cause some test failures on any dashboards that are still running python 2.5 (do any of these still exist?).<div><br></div><div>Backwards compatibility for Python 2.6 and 2.7 should be excellent. They saw only to major changes:</div><div>1) The wrappers use new-style classes, i.e. every VTK class is wrapped as a type object.  So type(vtkDataArray()) is vtkDataArray, unlike before when type(vtkDataArray()) was 'vtkobject'.</div><div>2) The wrappers support the new n-dimensional buffer interface, so numpy.asarray(vtk_array) creates a zero-copy numpy array from a VTK data array.</div><div><br></div><div>Python 3.2 and higher should also work well, with some caveats:</div><div>1) VTK is still set up to use python 2 by default, so when configuring VTK with cmake, you must provide the paths to the python 3 executable, the python 3 include dir, and the python 3 library.</div><div>2) Most of the python tests and examples will only run with python 2.</div><div>3) Most of VTK's python utility modules (e.g. <a href="http://vtk.tk">vtk.tk</a>) will only run with python 2.</div><div>4) The wrappers will encode python strings to utf8 bytes before passing it to VTK.</div><div><br></div><div>Obviously, converting the utility modules and tests to python 3 will be a lot of work.  And keeping support for python 2 is a must ... all code must run with python 2.6, 2.7, and 3.2+.</div><div><br></div><div>I'm particularly interested in hearing from people who are willing to help with these modules: vtk.wx,  vtk.qt4, vtk.gtk</div><div><br></div><div>Of course if anyone wants to convert some examples or tests, shoot an email to the list and I'll try to coordinate.  If you want to update the wiki examples, then you can just log into the wiki and edit them.</div><div><br></div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 5, 2015 at 6:51 PM, Andrew Maclean <span dir="ltr"><<a href="mailto:andrew.amaclean@gmail.com" target="_blank">andrew.amaclean@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="im HOEnZb"><div dir="ltr"><span style="font-size:12.8000001907349px">Ok thanks. I'll check it out soon. Just testing my builds and various scripts</span><br></div></span><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 6, 2015 at 10:45 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks, Andrew.  I just pushed the CommonCore test updates to the branch.<span><font color="#888888"><div><br></div><div> - David<br><div><br></div></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 5, 2015 at 5:11 PM, Andrew Maclean <span dir="ltr"><<a href="mailto:andrew.amaclean@gmail.com" target="_blank">andrew.amaclean@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi David,</div><div><br></div><div>Wonderful news. </div><div><br></div>Definitely be glad to help.<div>Setting up a Python 3.4 environment in Windows 10 on my laptop now.</div><div>I'll be using Anaconda Python.</div><div><br></div><div>Once this is done, I'll maintain both a python 2.7 and Python 3.4 build and see how things go.</div><div><br></div><div>Regards</div><div>   Andrew</div><div><br></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Thu, Aug 6, 2015 at 1:44 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">So, here's a brief update on python 3 status:</div><div class="gmail_extra"><br></div><div class="gmail_extra">The python-py3k merge branch compiles and runs with Python 3.2, 3.3, 3.4 and also Python 2.5, 2.6, 2.7 (I tried all six).  So, yes, you can build VTK against Python 3, and you can run VTK programs with Python 3.  I'll be doing a bit of cleanup of the next few days, but the current branch is very close to what I plan to merge.</div><div class="gmail_extra"><br></div><div class="gmail_extra">However: the test code in VTK is all written for Python 2, so right now the Python 3 buildbot that Ben has set up is showing all red for the testing.  Converting the tests will be a lot of work, especially because the tests must continue to run with Python 2.6 and 2.7 (definitely not 2.5, though).  Andrew, you mentioned that you might be able to provide some assistance, I would be very grateful for anything you have to offer.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I've already begun converting the python tests in Common/Core, because these test the core features of the wrappers.</div><span><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra"> - David</div></font></span></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div>