On 2016-11-25 20:30-0500 Hazen Babcock wrote: > > Hello, > > I would like to fix PLplot so that it works with Python3. At a minimum > it looks like this means fixing all the print statements, i.e.: > > print "asdf" -> print("asdf") > > I'll test against Python2.7. Do I also need to test against Python2.6? > Or is that far enough in the past that we don't support it anymore?
Hi Hazen: I thoroughly approve of your above goal. The last release for 2.6.x was in 2013, but some of the key python3 syntax such as print(<string>) were backported to it so by accident it might still work for us once you are done. But I suggest for now you concentrate on python-2.7 (which also includes the same backported Python 3 syntax) and Python 3.x. With regard to the bindings, have you seen <http://www.swig.org/Doc1.3/Python.html#Python_python3support>? It appears a very tiny modification (using the -py3 command line option for swig) of our present python bindings may be all you need to generate python3 bindings. So have fun experimenting with that option to see how far you get! With regard to the examples, they are really simple python code. Apparently, there is a script that converts python2 scripts to python-3 compatibility. I presume most of what that script would change would be print statements (to move from the "print <string>" to "print(<string>)" form). And with any luck at all, those new results would work both with python 2.7 (which supports "print(<string>)" and some other python-3 syntax) and python 3.x. Good luck with this project! Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel