<s> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> from . subscriber import Subscriber <EOL> from . topics import MessageReceived , PodAccepted <EOL> __all__ = [ '<STR_LIT>' ] <EOL> class MessageParser ( Subscriber ) : <EOL> def __init__ ( self , board , parser ) : <EOL> super ( MessageParser , self ) . __init__ ( board , { <EOL> PodAccepted + parser . MESSAGE_TYPE : self . _on_accepted } ) <EOL> self . _board = board <EOL> self . _parser = parser <EOL> def _on_accepted ( self , topic , pod ) : <EOL> self . _board . publish ( MessageReceived + self . _parser . MESSAGE_TYPE , <EOL> self . _parser . parse ( pod ) ) </s>
