<s> """<STR_LIT>""" <EOL> import os <EOL> import inspect <EOL> from termsaverlib . screen import base <EOL> from termsaverlib . plugins import get_available_plugin_screens <EOL> def get_available_screens ( ) : <EOL> """<STR_LIT>""" <EOL> ignore_list = [ '<STR_LIT>' ] <EOL> screens = [ ] <EOL> for module in os . listdir ( os . path . join ( os . path . dirname ( __file__ ) ) ) : <EOL> if module in ignore_list or module [ - <NUM_LIT:3> : ] != '<STR_LIT>' : <EOL> continue <EOL> module_name = module [ : - <NUM_LIT:3> ] <EOL> m = __import__ ( module_name , globals ( ) , locals ( ) ) <EOL> for name , obj in inspect . getmembers ( m ) : <EOL> if inspect . isclass ( obj ) and issubclass ( obj , base . ScreenBase ) and not name . endswith ( "<STR_LIT>" ) : <EOL> screens . append ( obj ) <EOL> screens . extend ( get_available_plugin_screens ( ) ) <EOL> return screens <EOL> def build_screen_usage_list ( ) : <EOL> """<STR_LIT>""" <EOL> screens = get_available_screens ( ) <EOL> screen_space = max ( [ len ( s ( ) . name ) for s in screens ] ) <EOL> return '<STR_LIT>' . join ( [ '<STR_LIT>' . join ( [ s ( ) . name , '<STR_LIT:U+0020>' , <EOL> '<STR_LIT:U+0020>' * ( screen_space - len ( s ( ) . name ) + <NUM_LIT:1> ) , <EOL> s ( ) . description ] ) for s in get_available_screens ( ) ] ) </s>
