[Tutor] 2to3 Help?

Vern Ceder vceder at canterburyschool.org
Mon Jan 12 14:07:39 CET 2009


> "Marco Petersen" <marco.m.petersen at gmail.com> wrote
> 
>> > This was the line of code:
>> >
>> > $ 2to3 testscript.py
> 
> But I suspect...
> this will run your default python interpreter which is likely to still
> be your 2.5 version. THe convertion scrpt is almost certainly 3.0.
> So I think you will need to explicitly call the interpreter:

Right - 2to3 isn't part of Python 2.5, but it is a part of 2.6 and 3.0
> 
> $ some/path/to/python3 2to3 testscript.py
> 
> Actually isn't 2to3 a .py file too? ie 2to3.py?

It's a Python file, but it doesn't have the .py extension. On my system 
it explicitly references Python 3 as the interpreter on the she-bang 
line, though, so that may not be the problem.
> 
> Just some guesses... I haven't got around to installing Python 3 yet.
> 
> Alan G. 

Cheers,
Vern  Ceder

-- 
This time for sure!
    -Bullwinkle J. Moose
-----------------------------
Vern Ceder, Director of Technology
Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804
vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137


More information about the Tutor mailing list