maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Python 3 availability? (https://talk.maemo.org/showthread.php?t=82411)

Rahul Kolasseri 2012-02-18 06:01

Python 3 availability?
 
Looks like only python 2.x is available for the n9, is there any way to get python 3.x on the n9?

caco3 2012-02-18 12:32

Re: Python 3 availability?
 
Python is provided by Nokia in the official repo. SO they would need to upgrade it.
why do you need Python 3?
You could try to pack it in OBS, but it will be a lot of work with all its extra libraries

Rahul Kolasseri 2012-02-18 12:40

Re: Python 3 availability?
 
Hmmm, would it be possible to package standard python 3.x without any of the nokia/meego specific libs(i.e so with only the standard libs that come with the standard python 3.x) into a deb for the n9? I need it because my school is teaching python for the computing course, and its using python 3, so having that would on my phone would make life easier for me.

caco3 2012-02-18 12:48

Re: Python 3 availability?
 
Maybe somebody did it already?
Did you look in the OBS?

thp 2012-02-18 13:05

Re: Python 3 availability?
 
Please read http://wiki.python.org/moin/Python2orPython3

Most "production code" runs on Python 2.x (although 2.7 would be better than the 2.6 that's currently in the N9 repos, as 2.7 has many features from 3.x backported, and also is still supported), so no need yet for Python 3 - especially since some libraries are not yet compatible with Python 3 or have only experimental support. If you want to use PySide (Qt) on the N9, for example, you should stick to Python 2.

rcolistete 2012-02-18 18:26

Re: Python 3 availability?
 
You can install Python 3.0 or 3.1 in Nokia N9 for pure Python use (not with Qt/QML) :

- enable the Harmattan SDK repository by installing this package;

- then, using Terminal as root ('devel-su' with 'rootme' password) :
# apt-get update
# apt-get install python3.1
After this operation, 20.4MB of additional disk space will be used. Confirme with 'Y' or 'y' all the questions.

The Harmattan SDK Python list shows that Python has versions 2.5, 2.6 (default), 3.0 and 3.1.

After installing, using Terminal as user :
$ python --version
gives "Python 2.6.6", while :
$ python3.1 --version
gives "Python 3.1.3".

Enjoy Python coding using N9, the best (current*) smartphone for Python.

(*) : N900 is better but it is hard to buy nowadays...

caco3 2012-02-19 00:06

Re: Python 3 availability?
 
Just today I was solving some brain exercises with a friend.
We had to encrypt a simple text for a geocache. To prove our encryption was correct, I quickly wrote a little tool for it.
Since I currently have most experience with Python, I decided to use my N9(50)s Python. So, using his Mac book, I connected through SSH to my phone and wrote the script with the nano editor :)
I also could have installed Python on his mac book, but the other way was quicker and more geeky ;)
I also realised that the Mac OS is not able to use SFTP which I use all the time to transfer my scripts and files from my Linux PC to the N9(50).

Rahul Kolasseri 2012-02-19 05:30

Re: Python 3 availability?
 
Quote:

Originally Posted by rcolistete (Post 1166681)
you can install python 3.0 or 3.1 in nokia n9 for pure python use (not with qt/qml) :

- enable the harmattan sdk repository by installing this package;

- then, using terminal as root ('devel-su' with 'rootme' password) :
# apt-get update
# apt-get install python3.1
after this operation, 20.4mb of additional disk space will be used. Confirme with 'y' or 'y' all the questions.

The harmattan sdk python list shows that python has versions 2.5, 2.6 (default), 3.0 and 3.1.

After installing, using terminal as user :
$ python --version
gives "python 2.6.6", while :
$ python3.1 --version
gives "python 3.1.3".

Enjoy python coding using n9, the best (current*) smartphone for python.

(*) : N900 is better but it is hard to buy nowadays...

i <3<3<3 you!

Elnath 2012-03-22 11:09

Re: Python 3 availability?
 
Hello Rcolistete, I know there is an other thread about n900 and python 3.x but you have been wrote that n900 is better for python.
So I want to ask you about instalation Python on N900. Is there any way?
Thanks in advance

caco3 2012-03-22 12:36

Re: Python 3 availability?
 
Quote:

Originally Posted by Elnath (Post 1182707)
Hello Rcolistete, I know there is an other thread about n900 and python 3.x but you have been wrote that n900 is better for python.
So I want to ask you about instalation Python on N900. Is there any way?
Thanks in advance

Python (2.6 or 2.7) is already installed on the N900. Or if not yet, install it with
Code:

apt-get install python
or use the package manager.


All times are GMT. The time now is 00:45.

vBulletin® Version 3.8.8