AbstractPlugin

# -*- coding=utf-8 -*-
import sys
sys.path.append("/home/doingming/rob")
from component import say

class AbstractPlugin(object):

    def __init__(self,con):   #暂时不用传入参数, 将con的特性传入加快速度
        self.say = say.speech #具备say的方法会说的Abstract ,具备say的方法,传入对话模块
        self.con = con

    def handle(self,query):
        pass

    def isValid(self,query):
        return False



if __name__=="__main__":
    p = AbstractPlugin(123)
    pharse = "你好么"
    p.con(pharse,True)

你可能感兴趣的:(python)