<s> __author__ = '<STR_LIT>' <EOL> __copyright__ = '<STR_LIT>' <EOL> __license__ = '<STR_LIT>' <EOL> __version__ = '<STR_LIT>' <EOL> """<STR_LIT>""" <EOL> import argparse <EOL> import os <EOL> import sys <EOL> from pbd import Pbd <EOL> def logo ( ) : <EOL> print """<STR_LIT>""" . format ( __version__ ) <EOL> def main ( ) : <EOL> logo ( ) <EOL> parser = argparse . ArgumentParser ( description = '<STR_LIT>' ) <EOL> input_group = parser . add_mutually_exclusive_group ( ) <EOL> input_group . add_argument ( '<STR_LIT>' , '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> input_group . add_argument ( '<STR_LIT>' , '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> parser . add_argument ( '<STR_LIT>' , '<STR_LIT>' , help = '<STR_LIT>' , default = '<STR_LIT:.>' ) <EOL> args = parser . parse_args ( ) <EOL> if args . file is None and args . dir is None : <EOL> print '<STR_LIT>' <EOL> sys . exit ( - <NUM_LIT:1> ) <EOL> if args . file is not None : <EOL> print '<STR_LIT>' . format ( args . file ) <EOL> p = Pbd ( args . file ) <EOL> p . disassemble ( ) <EOL> p . dump ( args . outdir ) <EOL> print '<STR_LIT>' . format ( os . path . join ( args . outdir , p . name ) ) <EOL> elif args . dir is not None : <EOL> files = [ os . path . join ( args . dir , f ) for f in os . listdir ( args . dir ) if os . path . isfile ( os . path . join ( args . dir , f ) ) ] <EOL> proto = [ ] <EOL> for f in files : <EOL> print '<STR_LIT>' . format ( f ) <EOL> p = Pbd ( f ) <EOL> p . disassemble ( ) <EOL> proto . append ( p ) <EOL> print '<STR_LIT>' <EOL> for p in proto : p . find_imports ( proto ) <EOL> print '<STR_LIT>' <EOL> for p in proto : p . dump ( args . outdir ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
