[PythonCAD] pythoncad select syptoms

Art Haas ahaas at airmail.net
Fri Jan 7 14:50:11 CET 2005

On Thu, 2005-01-06 at 21:15 -0600, John Griessen wrote:
> I only find a reference to gtk.gdk.INVERT  in
> gtkimage.getGC().set_function(gtk.gdk.INVERT)
> of 
> http://subversion.pythoncad.org:9000/svn/pythoncad/tags/DS1-R6/Interface/Gtk/gtkconobjs.py
> and only find a ref to gtk.gdk.INVERT)
> in
> the 2.51 ref manual.....
> First release covering PyGTK 2.5.1 (GTK+ 2.6)
> Do I need a cvs version of  PyGTK
> to run all the latest features of pythoncad?


No, PythonCAD should run with current PyGTK releases back to the 2.0
release several years ago.

As for this error you saw in an earlier e-mail:

select does not work as advertised and these messages show at the shell:

File "/usr/lib/python2.3/site-
line 401, in da_general_event
     handler(gtkimage, widget, event, _tool)
   File "/usr/lib/python2.3/site-
line 77, in select_motion_notify
     widget.window.draw_rectangle(gc, gtk.FALSE, _xmin, _ymin, _rw, _rh)
NameError: global name 'gc' is not defined

That is a bug - replace the variable 'gc' with '_gc' on line 77 and also
on line 83. I'll fix this in my code and the problem will be gone in the
next release.

Art Haas <ahaas at airmail.net>

More information about the PythonCAD mailing list