Added plugin.run() with arguments. /JL

This commit is contained in:
Jan Lerking
2025-03-27 09:35:29 +01:00
parent b5d2e1b0be
commit 34ba757bc6
4 changed files with 16 additions and 5 deletions
+9 -2
View File
@@ -5,12 +5,19 @@ class ExamplePlugin(XtendRBase):
Example:
>>> plugin = ExamplePlugin()
>>> plugin.run()
>>> plugin.run("Hello!", 25)
Passed arguments 2:
Argument 0: Hello!
Argument 1: 25
ExamplePlugin is running!
>>> plugin.stop()
ExamplePlugin has stopped!
"""
def run(self):
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):