Re: 2to6 ?
On 7/2/2012 11:02 AM, Thomas Heller wrote: Am 27.06.2012 20:06, schrieb Terry Reedy: On 6/27/2012 10:36 AM, Thomas Heller wrote: Is there a tool, similar to 2to3, which converts python2 code to code using six.py, so that it runs unchanged with python2 *and* python 3? Others have expressed a similar wish, but I do not know that anyone has actually revised 2to3 to make a 2to6, or how feasible that would be. Has nobody heard of, or even tried, modernize? http://pypi.python.org/pypi/modernize I had not, obviously. I'm glad you found it and hope it works for you. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
Re: 2to6 ?
Am 27.06.2012 20:06, schrieb Terry Reedy: On 6/27/2012 10:36 AM, Thomas Heller wrote: Is there a tool, similar to 2to3, which converts python2 code to code using six.py, so that it runs unchanged with python2 *and* python 3? Others have expressed a similar wish, but I do not know that anyone has actually revised 2to3 to make a 2to6, or how feasible that would be. Has nobody heard of, or even tried, modernize? http://pypi.python.org/pypi/modernize Thomas -- http://mail.python.org/mailman/listinfo/python-list
Re: 2to6 ?
On 6/27/2012 10:36 AM, Thomas Heller wrote: Is there a tool, similar to 2to3, which converts python2 code to code using six.py, so that it runs unchanged with python2 *and* python 3? Others have expressed a similar wish, but I do not know that anyone has actually revised 2to3 to make a 2to6, or how feasible that would be. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
2to6 ?
Is there a tool, similar to 2to3, which converts python2 code to code using six.py, so that it runs unchanged with python2 *and* python 3? Thomas -- http://mail.python.org/mailman/listinfo/python-list
I wish for a tool named "2to6".
Folks: I have been (I admit it) a Python 3 skeptic. I even speculated that the Python 3 backward-incompatibility would lead to the obsolescence of Python: http://pubgrid.tahoe-lafs.org/uri/URI:DIR2-RO:ixqhc4kdbjxc7o65xjnveoewym:5x6lwoxghrd5rxhwunzavft2qygfkt27oj3fbxlq4c6p45z5uneq/blog.html However, things are really looking up now because it turns out that it is eminently practical to support both Python 2 and Python 3 with a single codebase. There have been some recent discussions about that on this list. A few references: http://mail.python.org/pipermail/python-list/2010-July/1249312.html http://www.voidspace.org.uk/python/weblog/arch_d7_2010_03_20.shtml#e1167 http://nedbatchelder.com/blog/200910/running_the_same_code_on_python_2x_and_3x.html http://www.mail-archive.com/numpy-discuss...@scipy.org/msg26524.html Benjamin Peterson has even written a library intended to help programmers who want to do that: http://packages.python.org/six/ This note to the list is to express my wish for an automated tool named "2to6" which converts my Python 2.6 codebase to being both py2- and py2- compatible using Benjamin Peterson's six library. Regards, Zooko -- http://mail.python.org/mailman/listinfo/python-list