Add a job to handle processing of GCode from the backend

This commit is contained in:
Arjen Hiemstra 2015-01-28 17:57:14 +01:00
parent 143bdf3880
commit 78fa145bca

17
ProcessGCodeJob.py Normal file
View file

@ -0,0 +1,17 @@
from UM.Job import Job
from UM.Application import Application
import os
class ProcessGCodeJob(Job):
def __init__(self, message):
super().__init__()
self._message = message
def run(self):
with open(self._message.filename) as f:
data = f.read(None)
Application.getInstance().getController().getScene().gcode = data
os.remove(self._message.filename)