def writing_menu(self,vb):
        top_menu_prompt = "Choose an option from below:" \
                      "\n 1. Select one voice." \
                      "\n 2. Assign custom weights." \
                      "\n 3. Change ranktypes." \
                      "\n 4. Get voice info." \
                      "\n 5. Add a voice." \
                      "\n 6. Save Voicebox" \
                      "\n 7. Load Voicebox" \
                      "\n 8. Exit menu.\n"

        try:
            response = raw_input(top_menu_prompt)
        except NameError:
            response = input(top_menu_prompt)
        if response.isdigit():
            response = int(response)

            if response == 1:
                self.chooseVoiceMenu(vb)

            elif response ==2:
                self.setWeightMenu(vb)

            elif response ==3:
                vb.getVoices()
                for v in sorted(vb.voices):
                    try:
                        response = raw_input('Set ranktype for '+v+'\n')
                    except NameError:
                        response = input('Set ranktype for '+v+'\n')
                    if response in ['norm','freq','sig']:
                        vb.voices[v].ranktype = response
                        print(v + ' ranktype set to ' + str(response))
                    else:
                        print("Please choose either 'norm' 'freq' or 'sig'")
                vb.getVoices()
            elif response ==4:
                print("not implemented")
                return
            elif response ==5:
                self.addVoiceMenu(vb)
            elif response == 6:
                try:
                    path = 'saved/' + raw_input('Save as: ')
                except NameError:
                    path = 'saved/' + input('Save as: ') + '.pkl'
                with open(path, 'wb') as output:
                    pickle.dump(vb, output, pickle.HIGHEST_PROTOCOL)
            elif response == 7:
                try:
                    path = 'saved/' + raw_input('Load file: ')
                except __HOLE__:
                    path = 'saved/' + input('Load file: ') + '.pkl'
                with open(path, 'rb') as i:
                    p = pickle.load(i)
            elif response == 8:
                print("Returning to write")
                return

    # prints the log in a readable way
dataset/ETHPy150Open jbrew/pt-voicebox/writer.py/Writer.writing_menu