Esempio n. 1
0
def execute_command(user_input, argv):
    """
    dispatcher function to activate subroutines
    :param user_input: the function to activate
    :param argv: CLI-style argv arguments, if applicable
    """
    if user_input == 'Q' or user_input == 'QUIT':
        exit(1)
    elif user_input == '!HELP':
        print('Supported functions:\n'
              '    -QUOTE\n'
              '    -WATCH\n'
              '    -ANALYZE\n')
    elif user_input == 'QUOTE':
        import quote
        quote.__main__(argv)

    elif user_input == 'WATCH':
        import watch
        watch.__main__(argv)

    elif user_input == 'ANALYZE':
        import Analyze
        Analyze.__main__(argv)

    else:
        print("Invalid command")
def Startsimulation():
	global status
	global Analyze
	Analyze = importlib.reload(Analyze)
	result = Analyze.__main__()
	if not(simType == "Sweep"):
		displayonwindow("Simulation Results", result)
	status = "Simulation Done"