How do I set line attributes for draw_line() and draw_lines()?
James says: All drawing operations in X take a GC (which stands for graphics context), which holds some settings used for doing the drawing. If you are going to change the settings of a GC, it is probably best to create your own (you don’t really want to cause all your widgets to draw with double dashed lines). This can be done with the drawable.new_gc() method. You can then use the gc.