<s> import logging <EOL> import sys <EOL> from cliff . app import App <EOL> from cliff . commandmanager import CommandManager <EOL> class DemoApp ( App ) : <EOL> log = logging . getLogger ( __name__ ) <EOL> def __init__ ( self ) : <EOL> super ( DemoApp , self ) . __init__ ( <EOL> description = '<STR_LIT>' , <EOL> version = '<STR_LIT>' , <EOL> command_manager = CommandManager ( '<STR_LIT>' ) , <EOL> ) <EOL> def initialize_app ( self , argv ) : <EOL> self . log . debug ( '<STR_LIT>' ) <EOL> def prepare_to_run_command ( self , cmd ) : <EOL> self . log . debug ( '<STR_LIT>' , cmd . __class__ . __name__ ) <EOL> def clean_up ( self , cmd , result , err ) : <EOL> self . log . debug ( '<STR_LIT>' , cmd . __class__ . __name__ ) <EOL> if err : <EOL> self . log . debug ( '<STR_LIT>' , err ) <EOL> def main ( argv = sys . argv [ <NUM_LIT:1> : ] ) : <EOL> myapp = DemoApp ( ) <EOL> return myapp . run ( argv ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> sys . exit ( main ( sys . argv [ <NUM_LIT:1> : ] ) ) </s>
