Files
XtendR/plugins/example_plugin/example_plugin.py
2025-03-27 09:35:29 +01:00

25 lines
622 B
Python

from xtendr.xtendrbase import XtendRBase
class ExamplePlugin(XtendRBase):
"""Example plugin implementation.
Example:
>>> plugin = ExamplePlugin()
>>> plugin.run("Hello!", 25)
Passed arguments 2:
Argument 0: Hello!
Argument 1: 25
ExamplePlugin is running!
>>> plugin.stop()
ExamplePlugin has stopped!
"""
def run(self, *args):
print(f"Passed arguments {len(args)}:")
for idx, a in enumerate(args):
print(f"Argument {idx}: {a}")
print("ExamplePlugin is running!")
def stop(self):
print("ExamplePlugin has stopped!")