2to6 ?

Discussion in 'Python' started by Thomas Heller, Jun 27, 2012.

  1. 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
    Thomas Heller, Jun 27, 2012
    #1
    1. Advertising

  2. Thomas Heller

    Terry Reedy Guest

    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
    Terry Reedy, Jun 27, 2012
    #2
    1. Advertising

  3. 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
    Thomas Heller, Jul 2, 2012
    #3
  4. Thomas Heller

    Terry Reedy Guest

    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
    Terry Reedy, Jul 2, 2012
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zooko O'Whielacronx

    I wish for a tool named "2to6".

    Zooko O'Whielacronx, Jul 11, 2010, in forum: Python
    Replies:
    0
    Views:
    190
    Zooko O'Whielacronx
    Jul 11, 2010
Loading...

Share This Page