Esempio n. 1
0
def exit_app(exitCode=0):
    # Close browser session
    browser.close()
    # Resume input from stdin
    cinput.set_term_input(True)
    # Exit
    exit(exitCode)
Esempio n. 2
0
def init_app():
    # Clear screen
    os.system("clear")

    # Suspend input from stdin
    cinput.set_term_input(False)
Esempio n. 3
0
def exit_app():
    # Resume input from stdin
    cinput.set_term_input(True)

    print "\n\nThank you for practicing for Spelling Bee.\n"
    exit()
Esempio n. 4
0
    if args.runMode.lower() == "study" or args.runMode.lower() == "practice":
        run_practice(spellBee, args.runMode.lower())
    elif args.runMode.lower() == "test":
        run_test(spellBee)
    elif args.runMode.lower() == "revise":
        run_revision(spellBee)
    elif args.runMode.lower() == "scan":
        run_error_scan(spellBee)

    exit_app()

except Exception as e:
    # Logs the error appropriately
    logging.error(traceback.format_exc())
    print "\nERROR: " + traceback.format_exc()

    # Resume input from stdin
    cinput.set_term_input(True)
    
########################################################################
# Debugging Commands
########################################################################
'''
cd $PROJ
sudo python spelling_bee.py study 2016-004-french-challenge
sudo python spelling_bee.py practice 2016-004-french-challenge
sudo python spelling_bee.py test 2016-004-french-challenge
sudo python spelling_bee.py revise 2016-004-french-challenge
sudo python spelling_bee.py scan 2016-004-french-challenge
'''