Beispiel #1
0
def main_menu():
    print("\n-----AUDITORY SHIFT CIPHER MAIN MENU-----")
    print("\n\tOptions:")
    print("\t1. Create Message")
    print("\t2. Encoder Settings")
    print("\t3. Generate Tones")
    print("\t4. Create Audio File")
    print("\t5. Decoder Settings")
    print("\t6. Decode Message")
    print("\t7. Exit")
    try:
        menu_choice = int(input("Please Select an Option: "))
    except ValueError:
        print("\tError: Value Must Be A Number.\n")
        main_menu()
    if menu_choice == 1:
        message.main()
    elif menu_choice == 2:
        code = 0
        settings.settings_menu(code)
    elif menu_choice == 3:
        encoder.main()
    elif menu_choice == 4:
        audio_file.main()
    elif menu_choice == 5:
        code = 1
        settings.settings_menu(code)
    elif menu_choice == 6:
        decoder.main()
    elif menu_choice == 7:
        print("Goodbye...")
        sys.exit(0)
    else:
        print("\nInvalid Option...")
        main_menu()
Beispiel #2
0
 def toggle_settings():
     ss = [x for x in assets.cur_script.obs if isinstance(x,settings.settings_menu)]
     if ss:
         ss[0].close()
     else:
         assets.cur_script.obs.append(settings.settings_menu(sw=assets.sw,sh=assets.sh,assets=assets))
Beispiel #3
0
 def pl(*args):
     [x.close() for x in assets.cur_script.obs if isinstance(x,settings.settings_menu)]
     assets.cur_script.obs.append(settings.settings_menu(sw=assets.sw,sh=assets.sh,assets=assets))