<s> import os <EOL> import sys <EOL> import storm <EOL> class EmitterBase ( object ) : <EOL> DEFAULT_PYTHON = '<STR_LIT>' % ( sys . version_info . major , sys . version_info . minor ) <EOL> def __init__ ( self , script ) : <EOL> path , basename = os . path . split ( os . path . relpath ( script ) ) <EOL> assert len ( path ) == <NUM_LIT:0> <EOL> script = '<STR_LIT>' % os . path . splitext ( basename ) [ <NUM_LIT:0> ] <EOL> self . execution_command = self . DEFAULT_PYTHON <EOL> self . script = script <EOL> self . _json = { } <EOL> super ( EmitterBase , self ) . __init__ ( ) <EOL> def declareOutputFields ( declarer ) : <EOL> raise NotImplementedError ( ) <EOL> def getComponentConfiguration ( self ) : <EOL> if len ( self . _json ) : <EOL> return self . _json <EOL> else : <EOL> return None <EOL> class Spout ( EmitterBase , storm . Spout ) : <EOL> pass <EOL> class BasicBolt ( EmitterBase , storm . BasicBolt ) : <EOL> pass <EOL> class Bolt ( EmitterBase , storm . Bolt ) : <EOL> pass </s>
