<s> from cement . core . foundation import CementApp <EOL> from cement . core . controller import CementBaseController , expose <EOL> from cement . core import handler <EOL> class MyBaseController ( CementBaseController ) : <EOL> class Meta : <EOL> label = '<STR_LIT>' <EOL> class MySecondController ( CementBaseController ) : <EOL> class Meta : <EOL> label = '<STR_LIT>' <EOL> stacked_type = '<STR_LIT>' <EOL> stacked_on = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> arguments = [ <EOL> ( [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> dict ( help = '<STR_LIT>' , action = '<STR_LIT:store>' ) ) , <EOL> ( [ '<STR_LIT>' ] , <EOL> dict ( action = '<STR_LIT:store>' , nargs = '<STR_LIT:*>' ) ) , <EOL> ] <EOL> @ expose ( ) <EOL> def cmd1 ( self ) : <EOL> print "<STR_LIT>" <EOL> if self . app . pargs . extra_arguments : <EOL> print "<STR_LIT>" % self . app . pargs . extra_arguments [ <NUM_LIT:0> ] <EOL> print "<STR_LIT>" % self . app . pargs . extra_arguments [ <NUM_LIT:1> ] <EOL> class MyApp ( CementApp ) : <EOL> class Meta : <EOL> label = '<STR_LIT>' <EOL> base_controller = MyBaseController <EOL> def main ( ) : <EOL> app = MyApp ( ) <EOL> handler . register ( MySecondController ) <EOL> try : <EOL> app . setup ( ) <EOL> app . run ( ) <EOL> finally : <EOL> app . close ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
