[pygtk] libglade bug?
Hi, I have this code being called every few minutes by a gkt timeout function: print = print Count = + str(self.check_count) self.check_count += 1 print self.wtree.get_widget(label_checkbutton) print = if self.wtree.get_widget(label_checkbutton).get_active(): some code cut It has been working fine for a very long time, then I upgraded to ubuntu 9.04, and started getting this error: AttributeError: 'NoneType' object has no attribute 'get_active' And here is the output prior to the error: = Count = 41 gtk.CheckButton object at 0x97909dc (GtkCheckButton at 0x9806910) = = Count = 42 gtk.CheckButton object at 0x97909dc (GtkCheckButton at 0x9806910) = = Count = 43 gtk.CheckButton object at 0x97909dc (GtkCheckButton at 0x9806910) = = Count = 44 None = Some times it fails first run, somtimes after 3 or 4 iterations, other times it goes for hours... Any clues? am I calling the get_active incorectly? -- Rob Brown-Bayliss r.brown.bayl...@gmail.com ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] libglade bug?
Rob Brown-Bayliss schreef: Hi, I have this code being called every few minutes by a gkt timeout function: You can try to put this in your __init__() self.label_checkbutton = self.wtree.get_widget(label_checkbutton) Then you don't need to get the widget everytime and it cannot fail. print = print Count = + str(self.check_count) self.check_count += 1 print self.wtree.get_widget(label_checkbutton) This line would be then: print self.label_checkbutton print = if self.wtree.get_widget(label_checkbutton).get_active(): And this one: if self.label_checkbutton.get_active(): some code cut It has been working fine for a very long time, then I upgraded to ubuntu 9.04, and started getting this error: AttributeError: 'NoneType' object has no attribute 'get_active' And here is the output prior to the error: = Count = 41 gtk.CheckButton object at 0x97909dc (GtkCheckButton at 0x9806910) = = Count = 42 gtk.CheckButton object at 0x97909dc (GtkCheckButton at 0x9806910) = = Count = 43 gtk.CheckButton object at 0x97909dc (GtkCheckButton at 0x9806910) = = Count = 44 None = Some times it fails first run, somtimes after 3 or 4 iterations, other times it goes for hours... Any clues? am I calling the get_active incorectly? -- Rob Brown-Bayliss r.brown.bayl...@gmail.com mailto:r.brown.bayl...@gmail.com ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] libglade bug?
Rob Brown-Bayliss wrote: print = print Count = + str(self.check_count) self.check_count += 1 print self.wtree.get_widget(label_checkbutton) print = if self.wtree.get_widget(label_checkbutton).get_active(): some code cut It has been working fine for a very long time, then I upgraded to ubuntu 9.04, and started getting this error: AttributeError: 'NoneType' object has no attribute 'get_active' It's very likely a case of bug #546802, http://bugzilla.gnome.org/show_bug.cgi?id=546802 A known workaround is to access the dict of the widget, simply using: self.wtree.__dict__ self.wtree.get_widget('label_checkbutton')__dict__ Does anyone know if the latest PyGTK has this bug fixed? We encounter it frequently during in-house development. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] libraries for Python isometric cad drawings
On Wed, Apr 29, 2009 at 11:32 PM, Karl Ostmo kos...@gmail.com wrote: OpenGL seems like the way to go to create the orthographic projections. For printable/SVG output, you could use gluProject and feed your 2D-projected vertices to Cairo alongside your OpenGL code. I have used GL2PS before to make vector drawings from OpenGL, but it is in C. Thanks for the pointers Karl, much appreciated. I'll let you know if I get this thing off the ground :-) -- Darren Good luck! Karl On Thu, Apr 30, 2009 at 2:05 AM, Darren Hart dar...@dvhart.com wrote: I'm looking for some libraries to make isometric renderings of cabinet construction. I'd like to be able to render the cabinet on the screen and also print the rendering. I'm mostly just looking for a black and white line drawing for now. Can anyone recommend a higher level library for this or is PyOpenGL most likely the best bet? Or perhaps rolling my own using cairo? Thanks, -- Darren Hart ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- Code or be coded. -- Darren Hart ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/