473,557 Members | 2,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
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
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

http://unpythonic.blogspot.com/2007/...or-single.html
Sep 16 '08 #1
0 1774

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1519
by: sebb | last post by:
I just want to know how to install pyGTK on windows. Thanks
6
10161
by: Edwin Young | last post by:
Hi, I'm writing a fractal-generating program in a mixture of C and Python. Python handles all the GUI parts using PyGTK. After finishing the calculations, I have a buffer containing the RGB data of the image. I can display this fine on screen using draw_rgb_image. Now I need to save the image data into a file. gtk.gdk.Pixbuf.save() would...
0
1323
by: Michele Simionato | last post by:
I am in the process of learning pygtk and I would like to port some custom made Tkinter widgets to pygtk, just an exercise. For instance I have this code: .. from Tkinter import * .. .. class AnimatedLabel(Label): .. def __init__(self, master, text, width=72, maxspc=16, deltat=100, **kw): .. self.text = text
22
5744
by: dcrespo | last post by:
Hi all... I think wxPython is much better than PyGTK. First of all, PyGTK needs the GTK runtime installed, whereas wxPython is entirely Python's modules, so It facilitates the apps' distribution. Also, PyGTK uses specific controls or widgets of GTK, while wxPython uses native controls of the platform where the app is running. I'm...
25
4260
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK on Windows "(...) > can i use pyGTK under > Windows???
14
13347
by: Rod W | last post by:
I'm just starting out on Python but my primary goal is to provide applications with some user interface (GUI). Can someone point me to a good comparison of whether I should use wxPython (with wxGlade I assume) or PyGTK (with Glade I assume)? I'd prefer open source (not necessarily GPL though) tools. Rod
2
2559
by: Tim N. van der Leeuw | last post by:
I tried to create a windows executable of a pygtk program. My first attempt worked, kinda, except that no themes were applied and no readable fonts were found by pango; so all letters where just empty squares. But the program worked. I looked up some docs, found the following recipe on the PyGTK Wiki site:...
1
1163
by: krishnakant Mane | last post by:
has any one tried py gtk on windows? I tried to do a google search for accessibility related issues but did not find any thing specific to pygtk and windows accessibility. I even tried to search for just gtk and windows accessibility but again no result. so I am now posting this message as a last hope to at least get a "yes " or "no " answer...
1
1765
by: krishnakant Mane | last post by:
hello, I will be writing some code in PyGTK to run on linux. but I want to know if there are any installers or distutils available for PyGTK on windows? I have heard that installing gimp or even pygtk is next to impossible and is very tedious if at all one gets success. can any one share their experiences with installing and running pygtk...
0
7549
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7830
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8061
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7591
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6180
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1161
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.