def emc_status(actualtask): s = linuxcnc.stat() s.poll() task_mode = s.task_mode task_state = s.task_state exec_state = s.exec_state interp_state = s.interp_state #actualtask = self.task