boliveruk
Posts: 2
Joined: Mon Jul 23, 2012 6:59 pm

Python - what version

Wed Jul 25, 2012 7:21 am

As a person new to Python, and all modern languages (I last programmed in BBC Basic) what is the best version to use. I note that my SD Card has versions 2.x and 3.x. Which would be best to use and is code in one compatible with the other. I would rather not have to re-key anything I coded in the earlier version.

User avatar
jbaiter
Posts: 13
Joined: Tue Jul 03, 2012 7:52 pm

Re: Python - what version

Wed Jul 25, 2012 11:22 am

If you don't need libraries that haven't been ported to Python3 yet, I definitely suggest going the Python 3 route.

texy
Forum Moderator
Forum Moderator
Posts: 4996
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Python - what version

Wed Jul 25, 2012 11:52 am

The question gets asked every week, so search those threads for the pro's and con's. The above post gives one reason, another is what you plan to do with python? You would need to do very little keying, but library support for your choice of python is one major factor. Another may be your choice of tutorial or book, as it may use one or t'other.

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

antiloquax
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
Contact: Website

Re: Python - what version

Fri Jul 27, 2012 6:16 am

Python 3 comes with a script called 2to3 which converts python 2 code to python 3.

I would recommend going with Python 3, if you are a beginner.
There are some links to good tutorials on my website:
RaspberryPy.co

Return to “Python”

Who is online

Users browsing this forum: No registered users and 12 guests