File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 3737from . import highlevelil
3838
3939
40- class PluginCommandContext :
40+ class PluginCommandContext : """
41+ The ``class PluginCommandContext`` is used to access loaded plugins and their exposed methods with the context of a specific Binary VIew.
42+
43+ :Example:
44+ # To trigger a registered plugin with a BinaryView, for example:
45+ >>> bv = load("/tmp/file1")
46+ >>> ctx = PluginCommandContext(bv);
47+ >>> binexport = PluginCommand.get_valid_list(ctx)["BinExport"]
48+ >>> binexport.execute(ctx)
49+ """
50+
4151 def __init__ (self , view ):
4252 self ._view = view
4353 self ._address = 0
@@ -834,7 +844,7 @@ def is_valid(self, context):
834844
835845 def execute (self , context ):
836846 r"""
837- ``execute`` Execute a Plugin
847+ ``execute`` Execute a plugin. See the example in :class:`~PluginCommandContext`
838848
839849 :param str context: PluginCommandContext to pass the PluginCommand
840850 :rtype: None
You can’t perform that action at this time.
0 commit comments