def cmdlParse(argv):
    options = cmdline.defaultOptions()
    options.filenames = []
    options.outFormat = OUT_NORMAL
    options.outFile = None
    options.outRedirector = iolib.outRedirector()
    options.quietf = False
    options.md5f = False
    options.fullpathf = False
    scanner = cmdline.scanner(argv)
    while scanner.isMore():
        scanner.getNext()
        if scanner.isPositionalArg():
            arg = scanner.getValue()
            if not arg.startswith("@"):
                options.filenames.append(arg)
            else:
                newfiles = cmdline.processIncludeFile(arg[1:])
                if newfiles == None:
                    return None
                options.filenames.extend(newfiles)
        elif error.switches(scanner):
            pass
        elif scanner.match("/s"):
            options.recursef = True
        elif scanner.match("/z"):
            options.walkZipsf = True
        elif scanner.match("/table"):
            options.outFormat = OUT_TSV
        elif scanner.match("/out:"):
            options.outFile = scanner.getValue()
        elif scanner.match("/q"):
            options.quietf = True
        elif scanner.match("/-q"):
            options.quietf = False
        elif scanner.match("/md5"):
            options.md5f = True
        elif scanner.match("/-md5"):
            options.md5f = False
        elif scanner.match("/fullpath"):
            options.fullpathf = True
        elif scanner.match("/relpath"):
            options.fullpathf = False
        else:
            scanner.unknownSwitch()
    if len(options.filenames) == 0:
        error.fatal("Missing file name", ())
    return options
def cmdlParse(argv):
	options = cmdline.defaultOptions()
	options.filenames = []
	options.outFormat = OUT_NORMAL
	options.outFile = None
	options.outRedirector = iolib.outRedirector()
	options.quietf = False
	options.md5f = False
	options.fullpathf = False
	scanner = cmdline.scanner(argv)
	while scanner.isMore():
		scanner.getNext()
		if scanner.isPositionalArg():
			arg = scanner.getValue()
			if not arg.startswith("@"):
				options.filenames.append(arg)
			else:
				newfiles = cmdline.processIncludeFile(arg[1:])
				if newfiles == None:
					return None
				options.filenames.extend(newfiles)
		elif error.switches(scanner):
			pass
		elif scanner.match("/s"):
			options.recursef = True	
		elif scanner.match("/z"):
			options.walkZipsf = True	
		elif scanner.match("/table"):
			options.outFormat = OUT_TSV
		elif scanner.match("/out:"):
			options.outFile = scanner.getValue()
		elif scanner.match("/q"):
			options.quietf = True
		elif scanner.match("/-q"):
			options.quietf = False
		elif scanner.match("/md5"):
			options.md5f = True
		elif scanner.match("/-md5"):
			options.md5f = False
		elif scanner.match("/fullpath"):
			options.fullpathf = True
		elif scanner.match("/relpath"):
			options.fullpathf = False
		else:
			scanner.unknownSwitch()
	if len(options.filenames) == 0:
		error.fatal("Missing file name", ())
	return options
Example #3
0
# For more information please contact [email protected] or (617) 292-1889
#

import winonly
import noironpython

from error import error

try:
    import win32com.client
    from pywintypes import com_error
    from win32com import storagecon
    from pythoncom import StgIsStorageFile, StgOpenStorage, IID_IPropertySetStorage
    import win32com.client.makepy
except:
    error.fatal(
        "Windows COM support for Python is not installed on this computer")


def COMOpen(progID, events=None):
    try:
        if events == None:
            return win32com.client.Dispatch(progID)
        else:
            return win32com.client.DispatchWithEvents(progID, events)
    except:
        error.abortCheck()
        error.traceback()
        return None


makepy = win32com.client.makepy
# (C) Copyright 2010, Richard M. Smith, All rights reserved
# For more information please contact [email protected] or (617) 292-1889
#

import winonly
import noironpython

from error import error

try:
	import win32com.client
	from pywintypes import com_error
	from win32com import storagecon
	from pythoncom import StgIsStorageFile, StgOpenStorage, IID_IPropertySetStorage
	import win32com.client.makepy
except:
	error.fatal("Windows COM support for Python is not installed on this computer")

def COMOpen(progID, events=None):
	try:
		if events == None:
			return win32com.client.Dispatch(progID)
		else:
			return win32com.client.DispatchWithEvents(progID, events)
	except:
		error.abortCheck()
		error.traceback()
		return None
		
makepy = win32com.client.makepy