Advertisement
Guest User

Untitled

a guest
Jun 10th, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. import hal_glib
  2.  
  3.  
  4. class WCMC:
  5.     def __init__(self, halcomp):
  6.          self.halcomp = halcomp
  7.          self.linuxcnc = linuxcnc.STATE_ESTOP
  8.          self.c = hal.component("core_sim")
  9.          self.builder = gtk.Builder()
  10.          self.builder.add_from_file("WCMC.glade")
  11.          self.machine_on = hal_glib.GPin(core_sim.newpin('machine_on', hal.HAL_BIT, hal.HAL_IN))
  12.          self.window = self.builder.get_object("wcmc_Main")
  13.          if self.window:
  14.              self.window.connect("destroy", gtk.main_quit)
  15.  
  16.          dic = {
  17.              "on_button1_clicked":self.machine_on
  18.              }
  19.          self.builder.connect_signals(dic)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement