version
Jorge Gimeno
jlgimeno71 at gmail.com
Thu May 31 23:08:20 EDT 2018
Look at the six module
On Thu, May 31, 2018, 7:57 PM Mike McClain <mike.junk.46 at att.net> wrote:
> OK so I installed python 3.2, which is the latest available as a
> package in Debian Wheezy, because I've seen so many folks say it's a
> waste of time to play with Py2.7.
> Immediately my python playground 'my.python.py' failed as soon as
> I changes the '#!' line to python3.2.
> Most of the errors were because I had used 'print' without parens
> which 2.7 liked but 3.2 doesn't.
> Is there a way in a script to know which version of python is being
> run so I can write:
> If (version == 2.7):
> do it this way
> elsif (version == 3.2):
> do it another way
>
> Thanks,
> Mike
> --
> I Don't care how little your country is, you got a right to run it like
> you want to. When big nations quit meddling then the world will have peace.
> - Will Rogers
> --
> https://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list