smartInput
from smartinput import Shell, Fore
myshell = Shell()
#Important:
myshell.setcallback(handle_query) #handle_query function was defined in the above section
#Optional:
myshell.setintitle("Input: ") #defaults to "> "
myshell.setouttitle("Output: ") #defaults to "< "
myshell.setinputcolor(Fore.BLUE)
myshell.setoutputcolor(Fore.GREEN)
myshell.setalertcolor(Fore.RED) # Color for the alert messsage.
myshell.setexiton("quit") #defaults to "exit". Whenever user inputes this or press ctrl+d (EOF, linux), the shell exits.
#You can also pass all these in the Shell constructor:
#myshell = Shell(callback=handle_query, intitle="Input: ", outtitle="Output: ", inputcolor=Fore.BLUE, outputcolor=Fore.GREEN, alertcolor=Fore.RED, exiton="quit")
#Start the shell using:
myshell.start()