コード例 #1
0
ファイル: directions.py プロジェクト: zopyx/pysiriproxy
def _addDirection(direction):
    '''Create a function decorator which adds the given direction to
    the directions property for the function.

    * direction -- The direction

    '''
    return listProperty(_DIRECTIONS_PROP, direction)
コード例 #2
0
def createClassFilter(className):
    '''Create a function decorator which is used to filter received objects
    to find objects with the given class name.

    * className -- The class name used to filter received objects

    '''
    return listProperty(_CLASSES_PROP, className)
コード例 #3
0
ファイル: objectClasses.py プロジェクト: zopyx/pysiriproxy
def createClassFilter(className):
    '''Create a function decorator which is used to filter received objects
    to find objects with the given class name.

    * className -- The class name used to filter received objects

    '''
    return listProperty(_CLASSES_PROP, className)
コード例 #4
0
ファイル: speechRules.py プロジェクト: zopyx/pysiriproxy
    def wrapper(text, *args, **kwargs):
        '''A wrapper function which takes text and creates a decorator
        which adds the given speech rule to the list of speech rules
        for the decorated function.

        * text -- The text to use with the Rule

        '''
        speechRule = ruleClass(text, *args, **kwargs)
        return listProperty(_SPEECH_RULES_PROP, speechRule)
コード例 #5
0
    def wrapper(text, *args, **kwargs):
        '''A wrapper function which takes text and creates a decorator
        which adds the given speech rule to the list of speech rules
        for the decorated function.

        * text -- The text to use with the Rule

        '''
        speechRule = ruleClass(text, *args, **kwargs)
        return listProperty(_SPEECH_RULES_PROP, speechRule)