473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

pygtk does ... ?

I am experimenting (flailing around?) with glade and python. Both under MS
Windows and Linux.

I understand why I want to "import gtk"
It gives me access to the critical gui program loop
gtk.main() and main_quit()

I am also very grateful for
import gtk.glade
This lets me open my xml format glade file
gtk.glade.XML("MyGladeFile.glade")
full of defined gtk widgets and the function
signal_autoconnect(dic)
which lets me hang my Python callback routines onto those gtk widgets.

Whew! At least I've gotten started. It sure wasn't easy.

The question is -
What the heck is the pygtk library for?

help(pygtk) tells me not much more than -
"Python bindings for the GTK+ widget set"

Why would I want to "import pygtk" with it's single function
"require(version)"?
What is it supposed to do? Where does it fit in?

Or does it fit in at all?
Thomas Bartkus

Jul 21 '05 #1
1 1455
On 2005-07-08, Thomas Bartkus <th***********@comcast.net> wrote:
Why would I want to "import pygtk" with it's single function
"require(version)"?
What is it supposed to do? Where does it fit in?


The only reason I can think of is to use pygtk.require, so you can specify
which major version of pygtk you want to use, assuming you have multiple
versions:

import pygtk
pygtk.require('2.0')
import gtk

Otherwise, you don't need to import pygtk, just gtk.

Dave Cook
Jul 21 '05 #2

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

Similar topics

6
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...
4
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...
6
by: Mark Mitchell | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have a program written in python that tells me it requires PyGTK, so I DLed, ./configure, make, make install and the process seems to go ok. Some...
3
by: Google Mike | last post by:
This was a tough one (at least for me), and wasn't exactly what I wanted when I was working on just setting on item's font, but shows how you can change the font for an entire PyGTK application. I...
1
by: Franck Pommereau | last post by:
Hi all, I'm using PyGTK-2.0.0, when I detach a HandleBox, the resizing of the newly created window is broken: it can be resized but it's content (the HandleBox and its child) is not affected at...
25
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...
3
by: chengiz | last post by:
I am trying to build an app that requires pygtk so I installed the latter. The app does the following: import pygtk .... import gtk This crashes with ImportError: No module named gtk. I...
1
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
tracyyun
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...

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.