On Sep 16, 12:30 pm, binaryjesus <coolman.gu...@ gmail.comwrote:
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
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
windows.
>
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.absolu tepath()
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
pygtk.require(' 2.0')
import gtk
import gtk.glade
from ConfigParser import ConfigParser
>
class jDesk(object):
def __init__(self):
#self.seclstore .append(["0","Sectio n1"])
#self.catlstore .append(["cat 1"])
self.synclstore = gtk.ListStore(s tr,str,str,str, str,int)
self.seclstore = gtk.ListStore(s tr,str)
self.catlstore = gtk.ListStore(s tr,str)
self.process_gl ade()
>
def process_glade(s elf):
self.gladefile = "gui.glade"
self.glade = gtk.glade.XML(s elf.gladefile)
#windows
self.main_windo w = self.glade.get_ widget('MainWin dow')
#main window
self.templatefi le = self.glade.get_ widget('templat efile')
self.imageurl = self.glade.get_ widget('imageur l')
self.posttitle = self.glade.get_ widget('posttit le')
self.sectionbox = self.glade.get_ widget('section box')
self.categorybo x = self.glade.get_ widget('categor ybox')
self.demolink = self.glade.get_ widget('demolin k')
self.posttext = self.glade.get_ widget('posttex t')
self.statusbar = self.glade.get_ widget('statusb ar')
>
self.signal_aut oconnect()
self.main_windo w.show()
print '============== =====main wind created======== ========='
def run(self):
try:
print "Entering GTK main now"
gtk.main()
print "Leaving GTK main"
except:
print "Exception in main"
>
if __name__ == "__main__":
conf = ConfigParser()
conf.read('sett ings.cfg')
gtk.gdk.threads _init()
app = jDesk()
app.run()
>
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
BinaryJ
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
windows.
>
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.absolu tepath()
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
pygtk.require(' 2.0')
import gtk
import gtk.glade
from ConfigParser import ConfigParser
>
class jDesk(object):
def __init__(self):
#self.seclstore .append(["0","Sectio n1"])
#self.catlstore .append(["cat 1"])
self.synclstore = gtk.ListStore(s tr,str,str,str, str,int)
self.seclstore = gtk.ListStore(s tr,str)
self.catlstore = gtk.ListStore(s tr,str)
self.process_gl ade()
>
def process_glade(s elf):
self.gladefile = "gui.glade"
self.glade = gtk.glade.XML(s elf.gladefile)
#windows
self.main_windo w = self.glade.get_ widget('MainWin dow')
#main window
self.templatefi le = self.glade.get_ widget('templat efile')
self.imageurl = self.glade.get_ widget('imageur l')
self.posttitle = self.glade.get_ widget('posttit le')
self.sectionbox = self.glade.get_ widget('section box')
self.categorybo x = self.glade.get_ widget('categor ybox')
self.demolink = self.glade.get_ widget('demolin k')
self.posttext = self.glade.get_ widget('posttex t')
self.statusbar = self.glade.get_ widget('statusb ar')
>
self.signal_aut oconnect()
self.main_windo w.show()
print '============== =====main wind created======== ========='
def run(self):
try:
print "Entering GTK main now"
gtk.main()
print "Leaving GTK main"
except:
print "Exception in main"
>
if __name__ == "__main__":
conf = ConfigParser()
conf.read('sett ings.cfg')
gtk.gdk.threads _init()
app = jDesk()
app.run()
>
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
BinaryJ
that describes a way of building windows installers for pyGTK
applications at