I’m just learning PyGTK and I came across the plug and sockets section. I don’t really understand what they are used for – could anyone give me a real life example of a program where they would be used to illustrate what it is that they do?
Share
Incidentally I’m looking into this myself, so take my answer as “peer learning” not as the one of a super-expert on the subject.
Substantially they are used to connect two GUI that are not necessarily belonging to the same piece of software. Think to a music mixer: the people who built it provided it with a number of sockets (jack ports) and then each user can plug in whatever instrument they wish (standard jacks).
In this metaphor, both the mixer and the music instrument are different program, but they have a common way of encoding the signal (the gtk.Widget class) to exchange programs.
Again, I am not expert, but I read that QT, for example, makes a much more extensive use of this concept, using it also internally to the same application.
Not sure here, you could try to use google code search, though.