<s> import sys <EOL> import getopt <EOL> import subprocess <EOL> _name = "<STR_LIT>" <EOL> _version = "<STR_LIT>" <EOL> def main ( argv ) : <EOL> try : <EOL> opts , args = getopt . getopt ( argv , "<STR_LIT>" , [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:list>" , "<STR_LIT:version>" ] ) <EOL> if len ( opts ) == <NUM_LIT:0> : <EOL> if len ( args ) > <NUM_LIT:0> : <EOL> opts = [ ] <EOL> for arg in args : <EOL> opts . append ( ( "<STR_LIT>" , arg ) ) <EOL> else : <EOL> opts = [ ( "<STR_LIT>" , "<STR_LIT>" ) ] <EOL> for opt , arg in opts : <EOL> if opt in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> help ( ) <EOL> elif opt in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> print version ( ) <EOL> elif opt in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> subprocess . call ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , arg , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> elif opt in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> subprocess . call ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , arg , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> elif opt in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> subprocess . call ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> except getopt . GetoptError , err : <EOL> print "<STR_LIT>" + str ( err ) <EOL> sys . exit ( <NUM_LIT:2> ) <EOL> except : <EOL> print "<STR_LIT>" <EOL> sys . exit ( <NUM_LIT:2> ) <EOL> def version ( ) : <EOL> global _name , _version <EOL> return _name + "<STR_LIT:U+0020>" + _version <EOL> def help ( ) : <EOL> print version ( ) <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( sys . argv [ <NUM_LIT:1> : ] ) </s>
