[Tutor] How to get both 2.6 scripts as well as 3.1 scripts to runat command line?

Alan Gauld alan.gauld at btinternet.com
Thu Sep 16 09:52:24 CEST 2010

"Richard D. Moores" <rdmoores at gmail.com> wrote

> I have no problem running 3.1 scripts at the command line. However 
> 2.6
> scripts seems to require 2.x. For example, I get this error showing 
> that the
> old 2.x print won't do:

Thats correct, there are several big changes between V2 and V3.
They are not compatible. You can do some things to make a script
compatible but in the general case you cannot run 2.x scripts in 3.x

If you have the latest 2.x release you can run some 3.x code in
them by importing from future but its not fullproof. Similarly there 
a convertion script from 2 to 3 but again its not follprooof, it just
handles the most common cases. See the documentation for v3
for more details.

Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list