def complete_unpack(self, text, line, begidx, endidx): # these complete functions seem to eat exceptions, which is very bad # behaviour if anything here throws an excaption, you just won't get # completion, without knowing why model_upload_path = self.m2ee.config.get_model_upload_path() logger.trace("complete_unpack: Looking for %s in %s" % (text, model_upload_path)) return [f for f in os.listdir(model_upload_path) if os.path.isfile(os.path.join(model_upload_path, f)) and f.startswith(text) and (f.endswith(".zip") or f.endswith(".mda"))]
def complete_unpack(self, text, line, begidx, endidx): # these complete functions seem to eat exceptions, which is very bad # behaviour if anything here throws an excaption, you just won't get # completion, without knowing why model_upload_path = self.m2ee.config.get_model_upload_path() logger.trace("complete_unpack: Looking for %s in %s" % (text, model_upload_path)) return [ f for f in os.listdir(model_upload_path) if os.path.isfile(os.path.join(model_upload_path, f)) and f.startswith(text) and (f.endswith(".zip") or f.endswith(".mda")) ]
def precmd(self, line): self.m2ee.reload_config_if_changed() if line: logger.trace("Executing command: %s" % line) return line