mirror of
https://gitea.com/Lerking/XtendR.git
synced 2026-01-10 18:47:12 +01:00
25 lines
622 B
Python
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!")
|