def _list_sdcard_results(self, l): # dismiss waiting dialog fl = {} for f in l: f = '/sd/{}'.format(f) if f.endswith('/'): fl[f[:-1]] = {'size': 0, 'isdir': True} else: fl[f] = {'size': 0, 'isdir': False} # get file to print f = FileDialog() f.open(title='SD File to print', file_list=fl, cb=self._start_sd_print)
def start_print(self): if self.is_printing: if not self.paused: self.paused = True self.app.comms.stream_pause(True) self.ids.print_but.text = 'Resume' else: self.paused = False self.app.comms.stream_pause(False) self.ids.print_but.text = 'Pause' else: # get file to print f = FileDialog(self._start_print) f.open(self.last_path)
def _list_sdcard_results(self, l): # dismiss waiting dialog fl = {} for f in l: f = '/sd/{}'.format(f) # if f.endswith('/'): # fl[f[:-1]] = {'size': 0, 'isdir': True} # else: # fl[f] = {'size': 0, 'isdir': False} # as we can't handle subdirectories yet we do not list them if not f.endswith('/'): fl[f] = {'size': 0, 'isdir': False} # get file to print f = FileDialog() f.open(title='SD File to print', file_list=fl, cb=self._start_sd_print)