parameters: ()
return_statement: return 0
docstring: Main function for this script
docstring_summary: Main function for this script
docstring_tokens: Main function for this script
function: def Main():
    '''Main function for this script'''
    parser = GetOptionParser()
    (opt, args) = parser.parse_args()
    output = opt.output
    remove = opt.remove
    if not output:
      parser.error('You must specify an output file')
  
    if not args:
      parser.error('You must specify at least one object or library')
  
    output = output.strip()
    remove = remove.strip()
  
    if remove:
      try:
        remove_re = re.compile(opt.remove)
      except:
        parser.error('%s is not a valid regular expression' % opt.remove)
    else:
      remove_re = None
  
    if sys.platform != 'win32' and sys.platform != 'cygwin':
      parser.error('this script only works on Windows for now')
  
    # If this is set, we can't capture lib.exe's output.
    if 'VS_UNICODE_OUTPUT' in os.environ:
      del os.environ['VS_UNICODE_OUTPUT']
  
    CombineLibraries(output, remove_re, args)
    return 0
function_tokens: def Main ( ) : parser = GetOptionParser ( ) ( opt , args ) = parser . parse_args ( ) output = opt . output remove = opt . remove if not output : parser . error ( 'You must specify an output file' ) if not args : parser . error ( 'You must specify at least one object or library' ) output = output . strip ( ) remove = remove . strip ( ) if remove : try : remove_re = re . compile ( opt . remove ) except : parser . error ( '%s is not a valid regular expression' % opt . remove ) else : remove_re = None if sys . platform != 'win32' and sys . platform != 'cygwin' : parser . error ( 'this script only works on Windows for now' ) # If this is set, we can't capture lib.exe's output. if 'VS_UNICODE_OUTPUT' in os . environ : del os . environ [ 'VS_UNICODE_OUTPUT' ] CombineLibraries ( output , remove_re , args ) return 0