import shutil import struct import sys import time from bumblebee import hive from bumblebee.drivers import bumbledriver from threading import Thread, Condition old_lib_path = os.path.abspath( os.path.dirname(os.path.realpath(__file__)) + os.sep + 's3g') if os.path.exists(old_lib_path): shutil.rmtree(old_lib_path) lib_path = hive.getEngine('s3g', type="driver", repo="https://github.com/makerbot/s3g") sys.path.append(lib_path) # this has to come after the above code try: import makerbot_driver import serial except Exception as ex: raise Exception("Please use Makerbot's version of pyserial") class s3gdriver(bumbledriver.bumbledriver): def __init__(self, config): super(s3gdriver, self).__init__(config)
from subprocess import call, check_output, STDOUT from threading import Thread from bumblebee import hive from bumblebee.drivers import bumbledriver old_lib_path = os.path.abspath( os.path.dirname(os.path.realpath(__file__)) + os.sep + 'Printrun') # Remove the previous submodule if os.path.exists(old_lib_path): shutil.rmtree(old_lib_path) lib_path = hive.getEngine('Printrun', type="driver", repo="https://github.com/kliment/Printrun") sys.path.append(lib_path) # Kill the error output because of warnings from printrun #sys.stderr = open(os.devnull, 'w') from printrun import printcore from printrun import gcoder def scanPorts(): try: import serial.tools.list_ports result = [] for port in serial.tools.list_ports.comports():
import sys import re from subprocess import call, check_output, STDOUT from threading import Thread from bumblebee import hive from bumblebee.drivers import bumbledriver old_lib_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + os.sep + 'Printrun') # Remove the previous submodule if os.path.exists(old_lib_path): shutil.rmtree(old_lib_path) lib_path = hive.getEngine('Printrun', type="driver", repo="https://github.com/kliment/Printrun") sys.path.append(lib_path) # Kill the error output because of warnings from printrun #sys.stderr = open(os.devnull, 'w') from printrun import printcore from printrun import gcoder def scanPorts(): try: import serial.tools.list_ports result = [] for port in serial.tools.list_ports.comports(): device_tuple = (port.device, '', port.hwid) result.append(device_tuple)
import logging import os import shutil import struct import sys import time from bumblebee import hive from bumblebee.drivers import bumbledriver from threading import Thread, Condition old_lib_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + os.sep + "s3g") if os.path.exists(old_lib_path): shutil.rmtree(old_lib_path) lib_path = hive.getEngine("s3g", type="driver", repo="https://github.com/makerbot/s3g") sys.path.append(lib_path) # this has to come after the above code try: import makerbot_driver import serial except Exception as ex: raise Exception("Please use Makerbot's version of pyserial") class s3gdriver(bumbledriver.bumbledriver): def __init__(self, config): super(s3gdriver, self).__init__(config) self.currentProgress = 0