Active Topics

 



Notices


Reply
Thread Tools
Posts: 105 | Thanked: 143 times | Joined on Nov 2009
#1
Guys,

I have decided to jump in at the deep end and look at development for the n900. Im not much of a programmer though apart from dabbling in vb when needed at work so its probably going to be a slow ride. ive never been much for the hello world method of learning, preferring to get my hands on a more complex piece of code and just figure out how its working as i go. so heres where i am at the moment and any help or abuse that ive bitten off more than i can chew would be appreciated:

i have decided to start in python as im getting the general opinion that its easy to pick up and to my benefit the application im looking to port (xbox friend list) is available as python open source which i have messed about with and got running on ubuntu with minimal fuss. The problem now is it uses gtk.glade. I was under the impression that this was supported and that apps like gpodder used it but if i try to run the code on the n900 i get a module gtk.glade not found error.

From searching about i see reference to gtkbuilder as an alternative but while i understand the majority of the code im not entirely sure which bits reference the glade and so what would need to be changed.

Am i on to a lost cause trying to port a python app? any advise or help would be appreciated
 
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#2
Have you installed PyMaemo on your N900? I think that might solve it, give it a shot.
 

The Following User Says Thank You to Marcus For This Useful Post:
epage's Avatar
Posts: 1,684 | Thanked: 1,562 times | Joined on Jun 2008 @ Austin, TX
#3
Originally Posted by cferrism View Post
Guys,

I have decided to jump in at the deep end and look at development for the n900. Im not much of a programmer though apart from dabbling in vb when needed at work so its probably going to be a slow ride. ive never been much for the hello world method of learning, preferring to get my hands on a more complex piece of code and just figure out how its working as i go. so heres where i am at the moment and any help or abuse that ive bitten off more than i can chew would be appreciated:

i have decided to start in python as im getting the general opinion that its easy to pick up and to my benefit the application im looking to port (xbox friend list) is available as python open source which i have messed about with and got running on ubuntu with minimal fuss. The problem now is it uses gtk.glade. I was under the impression that this was supported and that apps like gpodder used it but if i try to run the code on the n900 i get a module gtk.glade not found error.

From searching about i see reference to gtkbuilder as an alternative but while i understand the majority of the code im not entirely sure which bits reference the glade and so what would need to be changed.

Am i on to a lost cause trying to port a python app? any advise or help would be appreciated
Making sure you have all the needed dependencies is an important thing. Also if you don't want to fork the app but keep it working on desktop and Maemo, I would recommend a module I use to hide away hildon specific code
https://garage.maemo.org/plugins/ggi...5009d3146bb474
__________________
770, n810, n900, Ideapad S10-3t
TheOneRing, DialCentral, Gonvert, Quicknote, Multilist, ejpi, nQa, Waters of Shiloah
Programming Blog
 

The Following User Says Thank You to epage For This Useful Post:
Posts: 105 | Thanked: 143 times | Joined on Nov 2009
#4
Cheers folks! Ill have a look and report back
 
Posts: 105 | Thanked: 143 times | Joined on Nov 2009
#5
Nope Instaled the Maemo-Python-Device development enviroment finally (after a dependency nightmare caused by another app), which I assume gives me pymaemo as it was the only one I could find and still complaining about the GTK.Glade statement. Seems to be the only part so far that it doesnt like which suprised me as if I comment it out it gets down to the xml glade statement before it falls over again. Pasted the first part of the code here in case anyone can tell me what I am missing (epage, cheers for the link to your source. defo useful)

#!/usr/bin/python


import ConfigParser
from ConfigParser import NoOptionError
import os
import os.path
import re
import threading
import time
import urllib2

import pygtk
pygtk.require("2.0")
import gtk
# import gtk.glade
import gnome
import gobject
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#6
Make sure you have python-glade2 installed..
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
epage's Avatar
Posts: 1,684 | Thanked: 1,562 times | Joined on Jun 2008 @ Austin, TX
#7
Originally Posted by cferrism View Post
Nope Instaled the Maemo-Python-Device development enviroment finally (after a dependency nightmare caused by another app), which I assume gives me pymaemo as it was the only one I could find and still complaining about the GTK.Glade statement. Seems to be the only part so far that it doesnt like which suprised me as if I comment it out it gets down to the xml glade statement before it falls over again. Pasted the first part of the code here in case anyone can tell me what I am missing (epage, cheers for the link to your source. defo useful)

#!/usr/bin/python


import ConfigParser
from ConfigParser import NoOptionError
import os
import os.path
import re
import threading
import time
import urllib2

import pygtk
pygtk.require("2.0")
import gtk
# import gtk.glade
import gnome
import gobject
I know an easy way to get the deps taken care of, install all of the apps in my signature

Well, Dialcentral should do the trick.
__________________
770, n810, n900, Ideapad S10-3t
TheOneRing, DialCentral, Gonvert, Quicknote, Multilist, ejpi, nQa, Waters of Shiloah
Programming Blog
 
Posts: 105 | Thanked: 143 times | Joined on Nov 2009
#8
doh! i was so busy checking the repository i never even thought to do an apt-get for the glade plugin (and just assumed it would be included as part of python like it was in ubuntu) Cheers fatalsaint that sorted it....well im now getting a segmentation error but im further than i was so more playing for me ) You guys have been a great help as i had been googling that for days.
 
Posts: 105 | Thanked: 143 times | Joined on Nov 2009
#9
awesomeness! got that issue sorted and the app is now loading and i can type in my username and password and connect to xbox live!! not showing anything once its connected and no notifications but once i have figured that out i will have a fully functional xbox friends app. this is why i love the n900....to be continued!!
 
Posts: 105 | Thanked: 143 times | Joined on Nov 2009
#10
Woohoo!

I have successfully ported my first app and I have to say Im pretty damn proud of myself, and feel I have contributed in some small way . Will work on making it a bit more maemo friendly later but coming to repository near you....once I figure out that side of things
Attached Images
 
 

The Following 2 Users Say Thank You to cferrism For This Useful Post:
Reply


 
Forum Jump


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