Re: [pygtk] Dynamic update

2011-10-14 Thread Arjan Molenaar
The observer pattern (publish/subscribe) comes to mind. Note that a GUI is an event driven system. You should somehow signal some GUI logic to do a redraw/update if the model (your network nodes) change. The most simple way is to let the nodes signal an event (call a function/method) that

Re: [pygtk] PYGTK

2011-10-14 Thread Arjan Molenaar
Hi, I would suggest not to use multi-threading unless you're absolutely sure you can't do it without. GObject has ways to deal with incoming events (network, disc, user input). See http://www.pygtk.org/docs/pygobject/glib-functions.html#function-glib--io-add-watch. Note that the most high

[pygtk] Win32: DLL load failed with Python 2.7.2, GTK+ bundle 2.22, PyCairo 1.8.10, PyGObject 2.28.3 and PyGTK 2.24.0

2011-10-14 Thread FriendFX
Hi folks, sorry to bother you with this problem - I have seen it coming up again and again in the archives - but the solutions (fixing PATH or mis-matching Python versions) apparently are not helping in my case. Here is what I downloaded: gtk+-bundle_2.22.1-20101227_win32.zip

[pygtk] gtk.builder and gtk.glade.XML

2011-10-14 Thread Arun p das
Hi i am new to pygtk like to know difference between these things loading glade file with 1) builder = gtk.Builder() builder.add_from_file(1.xml) and 2) self.wTree = gtk.glade.XML( expander.glade ) does each one make any difference in accessing libraries

[pygtk] Problems with coordinates in a drawing area control

2011-10-14 Thread craf
Hi everyone! I'm trying to learn PyCairo, and using the following code, I created a window with a scale of 200 x 200 CODE:- #!/usr/bin/python import gtk class Window(): def __init__(self): self.window = gtk.Window()

Re: [pygtk] gtk.builder and gtk.glade.XML

2011-10-14 Thread Timo
On 14-10-11 17:37, Arun p das wrote: Hi i am new to pygtk like to know difference between these things loading glade file with 1) builder = gtk.Builder() builder.add_from_file(1.xml) and 2) self.wTree = gtk.glade.XML( expander.glade ) does each one make any difference in

Re: [pygtk] Problems with coordinates in a drawing area control

2011-10-14 Thread Jamie Bliss
The X requires no change. Just flip and translate the Y. On Fri, Oct 14, 2011 at 12:52 PM, craf pyclut...@gmail.com wrote: Hi everyone! I'm trying to learn PyCairo, and using the following code, I created a window with a scale of 200 x 200 CODE:-

Re: [pygtk] Problems with coordinates in a drawing area control

2011-10-14 Thread craf
Hi Jamie Thank you very much for answering, if you could give me a small example,I appreciate it. I probe with cr.translate(0,-1 * 200), but nothing Regards Craf -Mensaje original- De: Jamie Bliss astronouth7...@gmail.com Para: craf pyclut...@gmail.com Cc: Pygtk pygtk@daa.com.au

Re: [pygtk] Problems with coordinates in a drawing area control

2011-10-14 Thread Jamie Bliss
There are several transformation methods: transform(), translate(), scale(), and rotate(). You need a transformation to go from this coordinate space: ^ | (Your user space) | + To this: + | | (The actual pixel space) V So you need to perform both a flip and a translate. On