maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Python/PyQT example code for doing everything? (https://talk.maemo.org/showthread.php?t=60778)

TiagoTiago 2010-08-21 05:13

Python/PyQT example code for doing everything?
 
A few years ago i had installed this python editor on my N73 and had downloaded a bunch of example scripts, each script showing how to do one thing, like one for pop up notifications, one for playing sounds etc, i think in that same group came this one that would show a green box (or was it a ball?) that would bounce against the screen edges and fall with "gravity", with the directional control applying impulse to it. I was starting to learn python, even though i had to code using a numeric keypad, but pretty much on about that same time the deterioration of my eyes condition started to accelerate signinificantly, and on top of that depression also caught me good and i dropped it. Now with surgeries done and healed, and with my new N900 i'm starting to try learning Python again; the point of this thread is to ask if any of you know where i can download a similar pack of scripts going from simple console "hello world"s to acessing the hardware and making user interfaces and graphics and stuff, do you?

Khertan 2010-08-21 05:49

Re: Python/PyQT example code for doing everything?
 
I think this scripts are the PyQt Example. If this is the case, it s available from your Application Manager in the extras-devel repository.

EDIT : It s available in testing : http://maemo.org/packages/view/python2.5-qt4-doc/

mairas 2010-08-21 07:11

Re: Python/PyQT example code for doing everything?
 
TiagoTiago,

If you're interested in first learning just pure Python, for example the Dive into Python book has plenty of examples. Then, the ActiveState Python Cookbook has examples (recipes) for about every generic algorithm or language feature you might wish (might be a bit specialized, though).

Assuming you're keen on GUI programming on Maemo. I warmly recommend you to go with PySide. PySide has bindings available for Qt Mobility, making it possible to access several crucial native APIs from Python, and in any case, it's the future-proof version when moving onwards to Harmattan and MeeGo. PySide examples are available at

http://qt.gitorious.org/pyside/pysid...s/trees/master

and if you want at tarball,

http://qt.gitorious.org/pyside/pysid...tarball/master

Cheers,

ma.

attila77 2010-08-21 07:19

Re: Python/PyQT example code for doing everything?
 
Quote:

Originally Posted by Khertan (Post 793695)
EDIT : It s available in testing : http://maemo.org/packages/view/python2.5-qt4-doc/

It's available from Extras (the version in extras-testing/devel is just a sideeffect of an upstream release, it doesn't contain significant differences). It is a self-contained package of runnable examples for most modules and major classes of Qt, and it doesn't require you to install any modules previously, do scp/chmodding, etc, to make them runnable. AFAIK the PySide examples and the PyQt examples are roughly the same thing.

ossipena 2010-08-21 07:36

Re: Python/PyQT example code for doing everything?
 
http://wiki.maemo.org/PyMaemo

(how hard is it to check wiki first and post a thread after that?!?!)

Khertan 2010-08-21 09:26

Re: Python/PyQT example code for doing everything?
 
Quote:

Originally Posted by ossipena (Post 793741)
http://wiki.maemo.org/PyMaemo

(how hard is it to check wiki first and post a thread after that?!?!)

How is hard to not post such answer ?

fpp 2010-08-21 18:33

Re: Python/PyQT example code for doing everything?
 
Heh, Tiago seems to have had it rough lately, cut the guy some slack, no ?...


All times are GMT. The time now is 10:47.

vBulletin® Version 3.8.8