1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-23 18:12:20 +00:00

Improved plugins, better tests, gevent

Moved from Yapsy again (it is not flexible enough), now we use a
custom solution.
The activation and deactivation of plugins is asynchronous, so
that plugins that take a long time don't interfere with the rest.
This commit is contained in:
J. Fernando Sánchez
2014-12-01 18:27:20 +01:00
parent 10f4782ad7
commit ff14925056
17 changed files with 241 additions and 110 deletions

View File

@@ -0,0 +1,10 @@
from senpy.plugins import SenpyPlugin
from time import sleep
class SleepPlugin(SenpyPlugin):
def __init__(self, info, *args, **kwargs):
super(SleepPlugin, self).__init__(info, *args, **kwargs)
self.timeout = int(info["timeout"])
def activate(self, *args, **kwargs):
sleep(self.timeout)

View File

@@ -0,0 +1,8 @@
{
"name": "Sleep",
"module": "sleep",
"description": "I am dummy",
"author": "@balkian",
"version": "0.1",
"timeout": "2"
}