def complete(self): import glob if not self.completing: self.completing = True contents = self.contents self.old_contents = contents vx.clear_contents_window(self) self.files = glob.glob('{}*'.format(contents)) if len(self.files) == 0: self.completing = False if len(self.files) == 0: self.completing = False vx.clear_contents_window(self) self.add_string(self.old_contents) else: completion = self.files.pop() vx.clear_contents_window(self) self.add_string(completion)
def _history_pullback(self): if len(_exec_prompt._history) > 0: vx.clear_contents_window(self) self.add_string(_exec_prompt._history[-1])