Reply
Thread Tools
Posts: 292 | Thanked: 131 times | Joined on Dec 2009
#1
I'm new to Python programming. Since I've started researching Python, I've noticed there are two different "branches": the 2.X and the 3.x. So, what do you recommend:

1) Start to learn 2.X, because this is the one that is available for Maemo 5?

2) Start to learn 3.x and wait for this version on Maemo 5?

Furthermore:

3) Are thre plans to bring Python 3.0 to Maemo?

4) What about PyQT4? I am very interested in PyQT. Is this available on both (2.x and 3.x) branches?

Thanks
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#2
Originally Posted by soeiro View Post
1) Start to learn 2.X, because this is the one that is available for Maemo 5?

2) Start to learn 3.x and wait for this version on Maemo 5?
I'd say start with the 2.x series. They are still being released (and features are backported from 3.x), and they remain compatible with previous releases, so all the bindings, etc.. keep working.

"Mainstream" Python 3.x is still not really the case, but the good news is that it's more of a "clean-up" than a re-invention, so the only differences that you will note between 2.x and 3.x (when it's time to move to the newer version) is that it's just a clean-up of the language and the libraries (so 3.x will feel more "logical" and "tidy" than 2.x). But there are lots of docs on the web describing the difference between 2.x and 3.x.

For Maemo development, just stick to Python 2.5 and then use whatever Python version will be used in future versions.

HTH.
 
Posts: 540 | Thanked: 288 times | Joined on Sep 2009
#3
Start with 2.5. I don't think upgrading to 3.x later is going to be a problem but waiting for it is probably a long wait.

PyQT (GPL, the orgininal QT python bindings) and PySide (LGPL) are both available for 2.5 Python on Maemo5.

Do note though at the moment GTK (more specifically Hildon) is still the "official" graphics toolkit for Maemo5.

On Maemo6 QT will be the "official" toolkit.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#4
Anderson Lizardo had this to say:
We will not migrate to python2.6 in Maemo 5 due to a (unresolved)
bug (MB#4734 [18]), where a core SDK package explicitly conflicts with
python >= 2.6, preventing any further upgrades from the 2.5.x series.
(http://lists.maemo.org/pipermail/mae...er/021433.html)

Looking at the bug, it still appears to hold true but I don't know if it affects any possible upgrades to 3.0.
 
Posts: 53 | Thanked: 90 times | Joined on Nov 2009 @ Manaus, Brazil
#5
Originally Posted by qwerty12 View Post
Looking at the bug, it still appears to hold true but I don't know if it affects any possible upgrades to 3.0.
Actually, this has been the reason to not choose 2.6 as the runtime at the time (3.0 was too "fresh" then ). The bug has been "fixed" since then, but see below why a upgrade during Maemo 5 is not feasible.

With the ratio of python applications already in extras considerably high (see http://mairas.net/pymaemo-stats/ for some numbers), it is very risky to switch from 2.5 to 2.6 or 3.0 in Fremantle, as they are binary incompatible (which affects bindings). This would break existing packages for no relevant gain, if not done carefully.

Supporting two runtime versions in Maemo is also not feasible, because you would need to have bindings compiled for both versions, which increases packages sizes considerably. It would be a problem also for Hildon applets, as just one Python loader can be loaded at a time (so in fact you would have either a 2.5 or a 2.6/3.0 loader, not both).

Of course none of these problems will exist once we begin working on Python support for the next Maemo release. It is not decided yet if it will be 2.6 or 3.0, but let's hold the discussion until that becomes relevant (i.e. when some public Harmattan SDK pre-release is made)

Note that code running on Python 2.5 will most probably work on 2.6 or 3.0 without changes, except for a few syntactic changes described on the Python documentation.

Regards,
__________________
Anderson Lizardo
 

The Following 3 Users Say Thank You to lizardo For This Useful Post:
Posts: 292 | Thanked: 131 times | Joined on Dec 2009
#6
Thanks y'all for the hints. I will start with Python 2.5 then.

Originally Posted by lizardo View Post
With the ratio of python applications already in extras considerably high (see http://mairas.net/pymaemo-stats/ for some numbers), it is very risky to switch from 2.5 to 2.6 or 3.0 in Fremantle, as they are binary incompatible (which affects bindings). This would break existing packages for no relevant gain, if not done carefully.

(...)

Of course none of these problems will exist once we begin working on Python support for the next Maemo release. It is not decided yet if it will be 2.6 or 3.0, but let's hold the discussion until that becomes relevant (i.e. when some public Harmattan SDK pre-release is made)
Lizardo, are you sure that nothing could be done about maemo5? I know very little of Python since I'm a beginner, but I do know that hearing that I will have to trash my current device and buy the new model when it becomes available is not very pleasing.

If there is anything I could do to help "promote" new versions of Python or whatever I will help.
 
Posts: 53 | Thanked: 90 times | Joined on Nov 2009 @ Manaus, Brazil
#7
Originally Posted by soeiro View Post
Lizardo, are you sure that nothing could be done about maemo5? I know very little of Python since I'm a beginner, but I do know that hearing that I will have to trash my current device and buy the new model when it becomes available is not very pleasing.
Ok, I suppose I was not clear. You do not need to "trash" your device just because you want to use Python 3.0. Your code will run on 2.5, 2.6, 3.0 ... and any future Python versions. Do not tie yourself to a specific Python version. In general:
  • Code you write for Python 2.5 will run without problems on 2.6/3.0
  • Code that you write for Python 2.6/3.0 will run without problems on 2.5

(See http://docs.python.org/whatsnew/index.html for the specific changes on each version; for the new features, there are tools that help you migrate old code to the new versions)

Just look at the Extras repository and see the number of wonderful and complex applications running on Python 2.5. I'm pretty sure you will have no limitations using it for your applications too.

Our packages are based on Debian, which will continue to maintain and make new releases for bug fixes for a long time. There is absolutely no problem in having 2.5.x in Maemo 5 for the entire lifetime of this product (in my opinion).

If there is anything I could do to help "promote" new versions of Python or whatever I will help.
Continue learning Python and promote your applications to Maemo 5 Extras repository. Then begin reporting bugs you find in our documentation. This is the best way for beginners to help.

Regards,
__________________
Anderson Lizardo
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:08.