def open_module_file(self): textCursor = self.editor.textCursor() text = textCursor.selection().toPlainText() if not text.strip(): return obj = actions.get_subobject(text) actions.open_module_file(obj)
def inspectExec(self, func): """ Call a function from the inspect module using the selected text as the input parameter and print the result. """ cursor = self.editor.textCursor() selection = cursor.selection() text = selection.toPlainText() if not text.strip(): return obj = actions.get_subobject(text) if obj is None: return print(self.inspectDict.get(func).__call__(obj))
def _open_module_directory(self): text = str(self.selectedText) obj = actions.get_subobject(text) actions.open_module_directory(obj)
def printHelp(self): text = self.selectedText obj = actions.get_subobject(text) if obj is not None: print(obj.__doc__)