471,889 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,889 software developers and data experts.

Re: Porting a pygtk app to Windows

On Sep 16, 12:30 pm, binaryjesus <coolman.gu...@gmail.comwrote:
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:http://i36.tinypic.com/x52uk9.jpg

i have written below the startup code of the app:

import pygtk
import gtk
import gtk.glade
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 = "gui.glade"
self.glade = gtk.glade.XML(self.gladefile)
self.main_window = self.glade.get_widget('MainWindow')
#main window
self.templatefile = self.glade.get_widget('templatefile')
self.imageurl = self.glade.get_widget('imageurl')
self.posttitle = self.glade.get_widget('posttitle')
self.sectionbox = self.glade.get_widget('sectionbox')
self.categorybox = self.glade.get_widget('categorybox')
self.demolink = self.glade.get_widget('demolink')
self.posttext = self.glade.get_widget('posttext')
self.statusbar = self.glade.get_widget('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()
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
0 1689

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by sebb | last post: by
6 posts views Thread by Edwin Young | last post: by
reply views Thread by Michele Simionato | last post: by
22 posts views Thread by dcrespo | last post: by
14 posts views Thread by Rod W | last post: by
2 posts views Thread by Tim N. van der Leeuw | last post: by
1 post views Thread by krishnakant Mane | last post: by
1 post views Thread by krishnakant Mane | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.