<s> from cement . core import foundation , handler <EOL> from cement . core . controller import CementBaseController , expose <EOL> class AbstractBaseController ( CementBaseController ) : <EOL> """<STR_LIT>""" <EOL> class Meta : <EOL> stacked_on = '<STR_LIT>' <EOL> stacked_type = '<STR_LIT>' <EOL> arguments = [ <EOL> ( [ '<STR_LIT>' , '<STR_LIT>' ] , dict ( help = '<STR_LIT>' ) ) , <EOL> ] <EOL> def _setup ( self , base_app ) : <EOL> super ( AbstractBaseController , self ) . _setup ( base_app ) <EOL> self . reusable_dict = dict ( ) <EOL> @ expose ( hide = True ) <EOL> def default ( self ) : <EOL> """<STR_LIT>""" <EOL> if '<STR_LIT>' in self . reusable_dict . keys ( ) : <EOL> pass <EOL> if self . app . pargs . foo : <EOL> print "<STR_LIT>" % self . app . pargs . foo <EOL> print ( "<STR_LIT>" % self . __class__ . __name__ ) <EOL> class MyAppBaseController ( CementBaseController ) : <EOL> """<STR_LIT>""" <EOL> class Meta : <EOL> label = '<STR_LIT>' <EOL> @ expose ( hide = True ) <EOL> def default ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> class Controller1 ( AbstractBaseController ) : <EOL> """<STR_LIT>""" <EOL> class Meta : <EOL> label = '<STR_LIT>' <EOL> @ expose ( ) <EOL> def command1 ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> class Controller2 ( AbstractBaseController ) : <EOL> """<STR_LIT>""" <EOL> class Meta : <EOL> label = '<STR_LIT>' <EOL> @ expose ( ) <EOL> def command2 ( self ) : <EOL> print ( "<STR_LIT>" ) <EOL> def main ( ) : <EOL> app = foundation . CementApp ( '<STR_LIT>' ) <EOL> try : <EOL> handler . register ( MyAppBaseController ) <EOL> handler . register ( Controller1 ) <EOL> handler . register ( Controller2 ) <EOL> app . setup ( ) <EOL> app . run ( ) <EOL> finally : <EOL> app . close ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
