mirror of
https://gitea.com/Lerking/XtendR.git
synced 2025-07-21 20:51:17 +02:00
25 lines
845 B
Python
25 lines
845 B
Python
from xtendr.xtendrsystem import XtendRSystem
|
|
|
|
if __name__ == "__main__":
|
|
"""Example usage of the PluginSystem.
|
|
|
|
Example:
|
|
>>> system = XtendR()
|
|
>>> system.attach("example_plugin")
|
|
Attached plugin 'example_plugin'.
|
|
>>> system.run("example_plugin")
|
|
ExamplePlugin is running!
|
|
>>> system.stop("example_plugin")
|
|
ExamplePlugin has stopped!
|
|
>>> system.detach("example_plugin")
|
|
Detached plugin 'example_plugin'.
|
|
"""
|
|
system = XtendRSystem()
|
|
system.attach("example_plugin") # Assuming 'example_plugin/plugin_info.json' exists
|
|
system.run("example_plugin", test="Hello!")
|
|
system.stop("example_plugin")
|
|
system.run("example_plugin", 25)
|
|
system.stop("example_plugin")
|
|
system.run("example_plugin", "Hello!", 25)
|
|
system.stop("example_plugin")
|
|
system.detach("example_plugin") |