On Mon, Jan 12, 2009 at 3:56 AM, Alan Gauld <alan.ga...@btinternet.com> wrote: > "Marco Petersen" <marco.m.peter...@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: > > $ some/path/to/python3 2to3 testscript.py > > Actually isn't 2to3 a .py file too? ie 2to3.py? 2to3 is a python program supplied with both Python 2.6 and 3.0. It is a simple launcher that starts lib2to3.main(). It has a shebang line to invoke the interpreter that, on my Mac at least, includes the complete path. That said, I too guess that somehow the OP has a mismatch between the Python version running and the version of lib2to3 being used. I would check on what is in 2to3. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor