<s> from ckstyle . cmdconsole . ConsoleClass import console <EOL> def doCombine ( name , props ) : <EOL> pluginName = camelCase ( name ) + '<STR_LIT>' <EOL> pluginClass = NullCombiner <EOL> try : <EOL> plugin = __import__ ( '<STR_LIT>' + pluginName , fromlist = [ pluginName ] ) <EOL> if hasattr ( plugin , pluginName ) : <EOL> pluginClass = getattr ( plugin , pluginName ) <EOL> else : <EOL> console . error ( '<STR_LIT>' % ( pluginName , pluginName ) ) <EOL> except ImportError as e : <EOL> pass <EOL> instance = pluginClass ( name , props ) <EOL> return instance . combine ( ) <EOL> class NullCombiner ( ) : <EOL> def __init__ ( self , name , props ) : <EOL> pass <EOL> def combine ( self ) : <EOL> return None , [ ] , False <EOL> def camelCase ( name ) : <EOL> splited = name . split ( '<STR_LIT:->' ) <EOL> collector = [ ] <EOL> for x in splited : <EOL> collector . append ( x . capitalize ( ) ) <EOL> return '<STR_LIT>' . join ( collector ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> print ( doCombine ( '<STR_LIT>' , [ <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ] ) ) </s>
