Ubuntu, Python and wxPython, of course.

Hi,

I'm not a Linux fan (never succeed to install/configure this thing),
however yesterday I downloaded Ubuntu 6.10 (Edgy) and I toyed a
little bit with it as live-cd.

You can guess what I tested. I opened a terminal and typed

$python

which displayed something like this...

version 2.4.4.c1 GCC 4.1.2 20060928
>>>

You may understand my suprise.

I "googled" a lot, I visited fora and I collected these informations.

- Python 2.4.x is the default Python interpreter in Edgy and in Dapper.
- Python 2.5 is available in Edgy's repositories but it's not installed
by default. It won't be in Dapper's repos. (this one came from a Ubuntu's
developers).
-And how install Python 2.5 in Edgy? and make this the only Python version in Ubuntu?
That's not a good idea. A lot of programs still use 2.4, and may break if you try
to make them use 2.5. Also, there aren't nearly as many libraries for 2.5 yet.
- You can install 2.5 through whatever package manager you prefer. It's in "python2.5".
You can use it by running your programs like "python2.5 foo.py".
Or, if you use a #! line, use this: "#!/usr/bin/env python2.5".
- ...

From what I understand, a wxPython application for Ubuntu should be
developed in two flavours, Python 2.4 for Dapper's users and for Edgy's
users sticking with 2.4 and Python 2.5 for Edgy's users.

I am confused. Did I miss something? Additional informations and comments
are welcome.

Jean-Michel Fauth, Swizerland

Hi,

wxpython code is interpreted and the same code works in 2 different versions of python unless it uses new stuff.
For example… if you litter your code with “with” statements (new in 2.5) that stuff won’t work on 2.4
I’ve had such an experience when I jumped in the “decorator” wagon… and my code required 2.4 (didn’t worked on 2.3 without modifications)

One other thing you have to understand is that Ubuntu IS supported Linux… that means that “default installation” play a very important role… so… if you want stability is better not use “young, cutting edge” software and python 2.5 is very very young…

Peter

···

On 10/29/06, jmf jfauth@bluewin.ch wrote:

From what I understand, a wxPython application for Ubuntu should be
developed in two flavours, Python 2.4 for Dapper’s users and for Edgy’s
users sticking with 2.4 and Python 2.5 for Edgy’s users.

I am confused. Did I miss something? Additional informations and comments

are welcome.

From my experience, if you use advanced features from the new python you will have to have 2 versions BUT if you use safe options (things that work in both versions) you don’t need 2 flavors… one will be just fine.

There is NO FATE, we are the creators.

>
> From what I understand, a wxPython application for Ubuntu should be
> developed in two flavours, Python 2.4 for Dapper's users and for Edgy's
> users sticking with 2.4 and Python 2.5 for Edgy's users.
>
> I am confused. Did I miss something? Additional informations and comments
> are welcome.

From my experience, if you use advanced features from the new python you
will have to have 2 versions BUT if you use safe options (things that work
in both versions) you don't need 2 flavors... one will be just fine.

This is the approach I use with PyPE, and I've got Python 2.3-2.5 and
wxPython 2.6.3.3+ supported.

[snip]

One other thing you have to understand is that Ubuntu *IS* supported
Linux... that means that "default installation" play a very important
role... so... if you want stability is better not use "young, cutting edge"
software and python 2.5 is very very young...

Perhaps, but it is arguably the best tested Python ever. There are a
set of buildbots (Python Buildbot | Python.org) for most major
platforms that Python supports, each of which run a compilation and full
regression test for every subversion commit (distributed based on
branches; 2.4, 2.5, and trunk).

- Josiah

···

"Peter Damoc" <pdamoc@gmail.com> wrote:

On 10/29/06, jmf <jfauth@bluewin.ch> wrote: