#NEWLINE# def _set_opt_strings( self , opts ) : #NEWLINE# #INDENT# 'directly from optparse\n\n        might not be necessary as this is passed to argparse later on' #NEWLINE# for opt in opts : #NEWLINE# #INDENT# if ( len ( opts ) < 2 ) : #NEWLINE# #INDENT# raise ArgumentError ( ( 'invalid option string %r: must be at least two characters long' % opt ) , self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( opt ) == 2 ) : #NEWLINE# #INDENT# if ( not ( ( opt [ 0 ] == '-' ) and ( opt [ 1 ] != '-' ) ) ) : #NEWLINE# #INDENT# raise ArgumentError ( ( 'invalid short option string %r: must be of the form -x, (x any non-dash char)' % opt ) , self ) #NEWLINE# #UNINDENT# self . _short_opts . append ( opt ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not ( ( opt [ 0 : 2 ] == '--' ) and ( opt [ 2 ] != '-' ) ) ) : #NEWLINE# #INDENT# raise ArgumentError ( ( 'invalid long option string %r: must start with --, followed by non-dash' % opt ) , self ) #NEWLINE# #UNINDENT# self . _long_opts . append ( opt )