[Pythonmac-SIG] Which version to use??

Matthias Baas matthias.baas at gmail.com
Wed May 26 00:57:04 CEST 2010


Rodney Somerstein wrote:
> At 11:17 AM -0700 5/25/10, Christopher Barker wrote:
>> Honestly, I don't know if the Mac is in any poorer position with
>> regard to Python 3 as any other platform.
>>
>> NONE of the major packages I use have been ported to Py3 on any
>> platform: numpy, SciPy, wxPython. Many of those are well supported on
>> the Mac, so I don't think there will be any issues there.
> 
> Thanks, Chris. This is the kind of thing I was trying to find out. After
> I asked the question I started reading the comp.lang.python newsgroup
> and see that lots of people seem to be in the same situation. There are
> a fair number of people wanting to USE Python 3.x - that is, develop
> WITH Python 3.x. However, the people that make all of the tools for
> those of us that want to use them are not porting or are at least not
> being very public about their ports.

Another problem with porting packages to Python 3 is that Boost.Python
or Pyrex are not yet available for Python 3 (Boost.Python is supposed to
support Python 3 now, but it didn't work for me). These are used to
write extension modules and as long as they are not ready, this will
block all the packages that are based on those tools.

> development community is a bit problematic. Unless the powers that be
> decide to once and for all cease development of the 2.x branch of
> Python, I'm not sure that 3.x will ever end up having the support that
> it needs in terms of ported packages. If I had the ability to port
> something like wxPython, I would definitely do so. 

By the way, for doing cross-platform GUI development you could also have
a look at PyQt. I think there's no binary around, but building for
Python 3 went absolutely smooth in my case.

> Unfortunately, that
> isn't the case. It seems kind of strange to start doing work with 2.7
> when supposedly 3.1.2 is the current version.

I'm quite sure that Python 2.7 will still be around for quite a while.
There's a growing number of commercial applications that use Python as
their scripting language and I would imagine that in their case, it
takes even longer until they move to Python 3, so the demand for Python
2.x packages will still be there for a while.
Apart from that, they are not entirely different languages, so if you
want to give Python a try, you could just as well begin with Python 2.6
or 2.7. If you write your programs with Python 3 in mind, then I think
moving to Python 3 eventually won't be such a big issue. You can use the
"-3" option when running Python to get warnings when you use stuff
that's incompatible with Python 3. Then there's the 2to3 tool that can
convert a lot of stuff automatically.
If you are using an IDE that has dedicated support for Python, you might
also be able to tell it you are writing code for Python 3, so that it
warns you when you are writing incompatible code. For example, in
Eclipse/PyDev you can set the grammar version that should be used for
checking the Python syntax (it constantly yells at me because I'm still
not used to print being a function... ;) )

Cheers,

- Matthias -



More information about the Pythonmac-SIG mailing list