def draw_dab_callback(self, *args):
     import liblo
     import document
     # TODO: put PLO stuff in separate file
     t = document.get_plo_target()
     try:
         liblo.send(t, "/plo/mypaint/surface/draw_dab", *args)
     except Exception, e:
         print e
 def python_set_base_value(self, setting_idx, val):
     import liblo
     import document
     # TODO: put PLO stuff in separate file
     cname = filter(lambda s: s.index == setting_idx, brushsettings.settings)[0].cname
     t = document.get_plo_target()
     try:
         liblo.send(t, "/plo/mypaint/brush/setting_changed", cname, val)
     except Exception, e:
         print e