

def append_read_rule(self, filename_pattern, action):
    'Adds a rule associating a filename pattern with an action for read\n        requests. The action given will execute when a read request is received\n        but before any responses are given.\n\n        Args:\n            filename_pattern: A string pattern to match future read request\n                filenames against.\n            action: A function to invoke when a later read request arrives\n                matching the given filename_pattern.\n        '
    self.read_rules.append((filename_pattern, action))

dataset/ETHPy150Open dropbox/emmer/emmer/response_router.py ResponseRouter.append_read_rule/original