示例#1
0
    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)
示例#2
0
 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))
示例#3
0
 def _open_module_directory(self):
     text = str(self.selectedText)
     obj = actions.get_subobject(text)
     actions.open_module_directory(obj)
示例#4
0
 def printHelp(self):
     text = self.selectedText
     obj = actions.get_subobject(text)
     if obj is not None:
         print(obj.__doc__)