def create_machine(uuid=None): # {{{ if uuid is None: uuid = protocol.new_uuid() process = subprocess.Popen( (fhs.read_data('driver.py', opened=False), '--uuid', uuid, '--allow-system', config['allow-system']) + (('--system', ) if fhs.is_system else ()), stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True) machines[uuid] = Machine(None, process, None) return uuid
def create_printer(uuid=None): # {{{ if uuid is None: uuid = protocol.new_uuid() process = subprocess.Popen( (fhs.read_data('driver.py', opened=False), '--uuid', uuid, '--cdriver', fhs.read_data('franklin-cdriver', opened=False), '--allow-system', config['allow-system']) + (('--system', ) if fhs.is_system else ()) + (('--arc', 'False') if not config['arc'] else ()), stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True) printers[uuid] = Printer(None, process, None, None) return uuid
def create_machine(uuid = None): # {{{ if uuid is None: uuid = protocol.new_uuid() process = subprocess.Popen((fhs.read_data('driver.py', opened = False), '--uuid', uuid, '--allow-system', config['allow-system']) + (('--system',) if fhs.is_system else ()) + (('--arc', 'False') if not config['arc'] else ()), stdin = subprocess.PIPE, stdout = subprocess.PIPE, close_fds = True) machines[uuid] = Machine(None, process, None) return uuid