mirror of
https://gitea.com/Lerking/XtendR.git
synced 2026-06-20 16:55:11 +02:00
Added plugin.run() with arguments. /JL
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user