[Tutor] Simple Python Problem
ALAN GAULD
alan.gauld at btinternet.com
Mon Sep 6 22:02:39 CEST 2010
> > I think there is a trick in V2.7 to make it act more like v3 but someone
> > else will need to tell you what it is... :-)
>Other than changing the input() to raw_input() for Python 2 compatibility,
And of course you can do that using
input = raw_input
> the following statement could be added to the beginning of the program
> to allow your Python 2 program to use the Python 3 style print function.
from __future__ import print_function
>That would help.
I wonder if we could create a module that would make v2.7 simulate v3 to
a close degree? hmm... And is it sensible to try, should we not perhaps
just accept the difference?
Alan G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100906/888f39f4/attachment.html>
More information about the Tutor
mailing list