def getOptions(baseFolderPath):
	options = Options()
	options.inputPath = baseFolderPath
	i = 1
	numOptions = len(sys.argv)

	while numOptions < i:
		arg = sys.argv[i]

		if arg == "-h":
			print __help__
			raise
		elif arg == "-u":
			print __usage__
			raise
		elif arg == "-d":
			print __doc__
			raise
		elif arg == "-v":
			options.verboseMode = True
		elif arg == "-o":
			i += 1
			try:
				outputPath = sys.argv[i]
			except IndexError:
				print >> sys.stderr, "OPTION ERROR: It looks like the output folder was not specified."
				raise
			if outputPath[0] == "-":
				print >> sys.stderr, "OPTION ERROR: It looks like the output folder was not specified."
				raise
			options.outputPath = outputPath
		elif arg == "-min":
			i += 1
			try:
				minimum = sys.argv[i]
			except IndexError:
				print >> sys.stderr, "OPTION ERROR: It looks like the minimum value was not specified."
				raise
			if minimum[0] == "-":
				print >> sys.stderr, "OPTION ERROR: It looks like the minimum value was not specified."
				raise
			try:
				options.minKern = int(minimum)
			except:
				print >> sys.stderr, "OPTION ERROR: It looks like the minimum value is not an integer."
				raise
		elif arg == "-kern":
			options.genKernFeature = True
		elif arg == "-mark":
			options.genMarkFeature = True
		elif arg == "-nufo":
			options.noUFOs = True
		elif arg == "-wtr":
			options.writeTrimmed = True
		elif arg == "-wsb":
			options.writeSubtables = True
		elif arg == "-mkmk":
			options.genMkmkFeature = True
		elif arg == "-clas":
			options.writeClassesFile = True
		elif arg == "-indi":
			options.indianScriptsFormat = True
		elif arg == "-trtg":
			options.trimCasingTags = True
		elif arg == "-hint":
			options.autohint = True
		elif arg == "-flat":
			options.flatten = True
		elif arg[0] == "-":
			print >> sys.stderr, "OPTION ERROR: Unknown option <%s>." %  arg
			raise
		i  += 1

	# To do the 'mkmk' feature, the 'mark' feature must be done as well, therefore enable it
	if options.genMkmkFeature and not options.genMarkFeature:
		options.genMarkFeature = True

	return options
dataset/ETHPy150Open adobe-type-tools/python-scripts/UFOInstanceGenerator.py/getOptions/swapped operands of `<`