<s> import os <EOL> import optparse <EOL> import subprocess <EOL> import sys <EOL> here = os . path . dirname ( __file__ ) <EOL> def main ( ) : <EOL> usage = "<STR_LIT>" <EOL> description = """<STR_LIT>""" <EOL> parser = optparse . OptionParser ( usage , description = description ) <EOL> parser . add_option ( "<STR_LIT:-c>" , dest = "<STR_LIT>" , default = "<STR_LIT>" , <EOL> help = "<STR_LIT>" ) <EOL> parser . add_option ( "<STR_LIT>" , "<STR_LIT>" , <EOL> action = "<STR_LIT:store_true>" , dest = "<STR_LIT>" ) <EOL> parser . add_option ( "<STR_LIT>" , "<STR_LIT>" , <EOL> action = "<STR_LIT>" , dest = "<STR_LIT>" ) <EOL> ( options , args ) = parser . parse_args ( ) <EOL> compiler = os . path . expanduser ( options . compiler ) <EOL> if not os . path . exists ( compiler ) : <EOL> sys . exit ( "<STR_LIT>" % compiler ) <EOL> if not args : <EOL> if options . verbose : <EOL> sys . stdout . write ( "<STR_LIT>" ) <EOL> args = [ os . path . join ( here , f ) for f in [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ] <EOL> for arg in args : <EOL> if not arg . endswith ( "<STR_LIT>" ) : <EOL> arg = arg + "<STR_LIT>" <EOL> to_compress = os . path . expanduser ( arg ) <EOL> if os . path . exists ( to_compress ) : <EOL> to_compress_min = "<STR_LIT>" % "<STR_LIT>" . join ( arg . rsplit ( "<STR_LIT>" ) ) <EOL> cmd = "<STR_LIT>" % ( compiler , to_compress , to_compress_min ) <EOL> if options . verbose : <EOL> sys . stdout . write ( "<STR_LIT>" % cmd ) <EOL> subprocess . call ( cmd . split ( ) ) <EOL> else : <EOL> sys . stdout . write ( "<STR_LIT>" % to_compress ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
