473,695 Members | 3,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.gla de")
full of defined gtk widgets and the function
signal_autoconn ect(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(versio n)"?
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 1471
On 2005-07-08, Thomas Bartkus <th***********@ comcast.net> wrote:
Why would I want to "import pygtk" with it's single function
"require(versio n)"?
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
10182
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 be ideal, but I'm stumped trying to create a Pixbuf from my image data. In C,...
4
2595
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
6
2037
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 errors but the process finishes so I assumed they weren't fatal errors. So now I attempt to run my python program and I get; $ gccp.py Traceback (most recent call last):
3
4921
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 stumbled on to it by accident. Once you have your widget as, say, variable 'w', do this: w.get_settings().set_string_property('gtk-font-name', 'sans normal 9',''); # some other font choices are:
1
1457
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 all and is not resized. Does any one have a solytion to this problem? Thanks in advance! Franck
25
4273
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???
3
4568
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 dont know where to get this gtk module from. I assumed pygtk would be
1
1773
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,...
0
1782
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
0
8582
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,...
0
9122
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9001
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8860
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,...
0
8832
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 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...
0
7672
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4348
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4587
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.