<s> from optparse import OptionParser <EOL> from pprint import pprint <EOL> import sys <EOL> from babel . localedata import load , LocaleDataDict <EOL> def main ( ) : <EOL> parser = OptionParser ( usage = '<STR_LIT>' ) <EOL> parser . add_option ( '<STR_LIT>' , action = '<STR_LIT>' , dest = '<STR_LIT>' , <EOL> help = '<STR_LIT>' ) <EOL> parser . add_option ( '<STR_LIT>' , action = '<STR_LIT:store_true>' , dest = '<STR_LIT>' , <EOL> help = '<STR_LIT>' ) <EOL> parser . set_defaults ( inherit = True , resolve = False ) <EOL> options , args = parser . parse_args ( ) <EOL> if len ( args ) not in ( <NUM_LIT:1> , <NUM_LIT:2> ) : <EOL> parser . error ( '<STR_LIT>' ) <EOL> data = load ( args [ <NUM_LIT:0> ] , merge_inherited = options . inherit ) <EOL> if options . resolve : <EOL> data = LocaleDataDict ( data ) <EOL> if len ( args ) > <NUM_LIT:1> : <EOL> for key in args [ <NUM_LIT:1> ] . split ( '<STR_LIT:.>' ) : <EOL> data = data [ key ] <EOL> if isinstance ( data , dict ) : <EOL> data = dict ( data . items ( ) ) <EOL> pprint ( data ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
