By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,865 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,865 IT Pros & Developers. It's quick & easy.

Re: Porting a pygtk app to Windows

P: n/a
On Sep 16, 12:30 pm, binaryjesus <
hi everyone,
first of all
I had written an app using pygtk module and created the GUI with
glade.All the development was done on a linux machine and the app was
working fine all this tme in linux.

now, the thing is i have to change the development environment to
windows. So this means that i have to port the application to work in

Initially i thought that porting an application written using a
platform independent language and cross-platform window frame work
would be a piece of cake. Well i guess all the assumptions end there.
unlike linux, in windows pygtk and the GTK frame work are not
installed by default.

So, long story short. i installed GTK devel, pygtk, pygobject, pycaro,
glade ui. Also made a lot of path adjustments (os.path.absolutepath()
is not portable i guess) and finally got the app to at least start
without showing an error.

The problem that i am now facing is that nothing shows up in the app.
No menu, buttons, frames or anything else is visible. When i move the
cursor over the window it changes into an hour-glass type icon. hoe
ever all c++ GTK programs seem to render well.

here is a screen shot:

i have written below the startup code of the app:

import pygtk
import gtk
from ConfigParser import ConfigParser

class jDesk(object):
def __init__(self):
#self.catlstore.append(["cat 1"])
self.synclstore = gtk.ListStore(str,str,str,str,str,int)
self.seclstore = gtk.ListStore(str,str)
self.catlstore = gtk.ListStore(str,str)

def process_glade(self):
self.gladefile = "" =
self.main_window ='MainWindow')
#main window
self.templatefile ='templatefile')
self.imageurl ='imageurl')
self.posttitle ='posttitle')
self.sectionbox ='sectionbox')
self.categorybox ='categorybox')
self.demolink ='demolink')
self.posttext ='posttext')
self.statusbar ='statusbar')

print '===================main wind created================='
def run(self):
print "Entering GTK main now"
print "Leaving GTK main"
print "Exception in main"

if __name__ == "__main__":
conf = ConfigParser()'settings.cfg')
app = jDesk()

i have tried a lot of things, checked up paths, checked libcairo but
nothing seems to help.problem seems to be with pygtk since other c++
GTK programs like pedgin and GTK demo rn fine.
So maybe is there any pygtk windows bugs that i coming from linux
background might not be knowing about or perhaps u have encountered
such a problem in the past before ?
Much thanks in advance
I haven't tried it myself, but I came across a blog post the other day
that describes a way of building windows installers for pyGTK
applications at
Sep 16 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.