473,695 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PyGTK Classes Problems

I can't seem to get a function to continue after I call another gtk
window class. Basically I need to grab a date from a calendar in one
windows and insert that value into an entry box on the calling window.

Calling Window:
import winCal

def getDate(self, widget):
cimsCal.winCal. dateSelected =

cimsCal.winCal( )


self.wTree.get_ widget("entDate ").set_text(cim sCal.winCal.dat eSelected)

WinCal Class:
#!/usr/bin/env python





# Create a class which is the actual program to be
winCal(gtk.Wind ow):


dateSelected =

# This is where we hook in our glade file and connect to the gui

gladefile =

self.windowname =
self.wTree = gtk.glade.XML(g ladefile,
self.windowname )
# Create a dictionary of function
dic = { "on_calendar1_d ay_selected_dou ble_click" :


self.wTree.sign al_autoconnect( dic)


# Start

def giveDate(self,

self.dateSelect ed =
self.wTree.get_ widget("calenda r1").get_date ()

self.wTree.get_ widget("winCal" ).destroy()

if __name__ ==

app = winCal()

After I do this cimsCal.winCal( ) the print "TEST" never happens. What
am I doing wrong.

Tom Grove

Jul 21 '06 #1
0 899

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

Similar topics

by: Will Ware | last post by:
In July there was a thread about problems on Red Hat 9 with PyGTK not playing nice with Glade. I was tinkering with this a little bit tonight, starting with the code I found in this article: http://www.linuxjournal.com/article.php?sid=6586 Based on what was written, I tried this and had no joy: ###################################### import gtk import gtk.glade class BadGui:
by: zinc | last post by:
Hi Pythoneers, Im interested in trying some gui programming with the GTK2 toolkit. I found this brief article,(http://www.linuxjournal.com/article.php?sid=6586), that speaks about utilising 'Glade' to help build these gui. I downloaded the pyGTK tarball from http://www.daa.com.au/~james/software/pygtk/ i do the usual ./configure, make, makeinstall.
by: j_mckitrick | last post by:
Hi all. Here is a tiny container for one of each combo box, along with the glade file. Just 2 widgets, so hopefully not too large. How the heck do I get the selection from the ComboBox, as opposed to the ComboEntryBox? I'm pulling my hair out over this one! jonathon
by: Dave Walker | last post by:
I've just setup a new box with Slackware 10, and am running into problems with simple programs that worked just fine on my old slak box (and still do). The only difference I can see between the two boxes is that the new one is running python 2.3.4, and the old is 2.3.3. The code is a barely modified version of one of the tutorials, and the errors I get are: Traceback (most recent call last): File "./oldmp3.py", line 78, in ?
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 learning both, but at a slow step, so I want to know all the comments about this subject in this group.
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???
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 on windos? any links for downloading proper packages will be highly appreciated. regards,...
by: He Jibo | last post by:
Hi, Everyone, Could someone help me how to install pygtk? I get some problems with it. Here is the error I get while install pygtk: https://netfiles.uiuc.edu/jibohe2/error.GIF?uniq=-k6678k I use python 2.4, I first installed glade-2.0.1-win32_with_gtk, and then pycairo-1.0.2-1.win32-py2.4, pygobject-2.12.3-1.win32-py2.4, and
by: Michael Palmer | last post by:
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 http://unpythonic.blogspot.com/2007/07/pygtk-py2exe-and-inno-setup-for-single.html
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.