delay_plugin.py

来自「这是一个支持向量机的代码」· Python 代码 · 共 23 行

PY
23
字号
plugin_name  = "Delay"import utilimport timedef create(callback):    n = util.GetInput(question="seconds:",default="2")    if not n: return    return delay(n)class delay:    input_description = [('input', object)]    output_description = [('output', None)]    def __init__(self,n):        self.n = n    def configure(self):        n = util.GetInput(question="seconds:",default=self.n)        if not n: return        self.n = n        return True    def run(self,input):        time.sleep(int(self.n))        return {'output': input}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?