A question about Python versions

G

Gib Bogle

I am learning Python, and using PyQt to develop a GUI that will be used to run a
Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw).
Without thinking about it I downloaded and started working with a fairly recent
Python version, 2.5.4. I've now become aware of the existence of Python 3.1,
which apparently is a major revision of the language. Does it make sense to
stick with Python 2.x at this point, or should I be starting off with 3.1? If
it is recommended to stick with version 2, should I use the latest (2.6.4 or
2.7), and if so why? Thanks.
 
C

Chris Rebert

I am learning Python, and using PyQt to develop a GUI that will be used to
run a Fortran program on Windows, Linux and Mac OS X (I think Python is
great, btw). Without thinking about it I downloaded and started working with
a fairly recent Python version, 2.5.4.  I've now become aware of the
existence of Python 3.1, which apparently is a major revision of the
language.  Does it make sense to stick with Python 2.x at this point, or
should I be starting off with 3.1?

This is an FAQ, so you can search the archives for many other
responses. If your program needs to use any third-party libraries
besides PyQt, you should probably use 2.x as most libraries have yet
to be ported to 3.x yet (luckily, PyQt apparently has been ported
already). If your program will be pretty self-sufficient, Python 3 is
definitely an option and will be nicer to use thanks to the
improvements to the language, but most of the changes (aside from
strings becoming Unicode) aren't dramatic; it is clearly still the
same language (unlike Perl 5 -> Perl 6).
If it is recommended to stick with
version 2, should I use the latest (2.6.4 or 2.7), and if so why?  Thanks.

The latest stable one, 2.6.4 (2.7 is a preview release); there's no
reason not to, and newer versions have more features, bugfixes, etc.
Though you should double-check the compatibility of any libraries
you'll be using of course.

Cheers,
Chris
 
S

Sridhar Ratnakumar

I am learning Python, and using PyQt to develop a GUI that will be used
to run a Fortran program on Windows, Linux and Mac OS X (I think Python
is great, btw). Without thinking about it I downloaded and started
working with a fairly recent Python version, 2.5.4. I've now become
aware of the existence of Python 3.1, which apparently is a major
revision of the language. Does it make sense to stick with Python 2.x
at this point, or should I be starting off with 3.1?

Stick with 2.x.
If it is
recommended to stick with version 2, should I use the latest (2.6.4 or
2.7), and if so why? Thanks.

2.6.4 definitely (as 2.7 final is not released yet).

Also see: http://stackoverflow.com/questions/170921

-srid
 
T

Terry Reedy

I am learning Python, and using PyQt to develop a GUI that will be used
to run a Fortran program on Windows, Linux and Mac OS X (I think Python
is great, btw). Without thinking about it I downloaded and started
working with a fairly recent Python version, 2.5.4. I've now become
aware of the existence of Python 3.1, which apparently is a major
revision of the language. Does it make sense to stick with Python 2.x at
this point, or should I be starting off with 3.1? If it is recommended
to stick with version 2, should I use the latest (2.6.4 or 2.7), and if
so why? Thanks.

My view is that if PyQt works with 3.1 (I have the impression it does
but may be wrong) and that is the only 3rd parth library you need, or
anything else you need works with 3.1, then strongly consider 3.1 for
new code. The main difference between 2.6 and 3.1 is the number of old,
obsolete things removed that you will not even be tempted to learn about.

Terry Jan Reedy
 
G

Gib Bogle

Terry said:
My view is that if PyQt works with 3.1 (I have the impression it does
but may be wrong) and that is the only 3rd parth library you need, or
anything else you need works with 3.1, then strongly consider 3.1 for
new code. The main difference between 2.6 and 3.1 is the number of old,
obsolete things removed that you will not even be tempted to learn about.

Terry Jan Reedy

On balance I think I'll stick with 2.x - another factor I didn't mention is that
most end-users will probably not have 3.x installed on their machines.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,965
Members
47,511
Latest member
svareza

Latest Threads

Top