调试器忽略函数中的输入(Python)

时间:2018-11-24 11:49:51

标签: python debugging input

im正在尝试调试此功能。当涉及到输入部分(选择=输入)时,它将我重定向到名为parce.py和coedecs.py的新文件,并且实际上不执行任何操作或要求输入 如何为调试器分配输入?

from wave_helper import *


def menu():
    VALID_CHOISES = [1,2,3,4]
    print('Welcome! What would you like to do?')
    print('1.Change wav file')
    print('2.Merge two wav files')
    print('3.Compose melody in wav format')
    print('4.Exit the program \n')
    print('Type the options number, followed by Enter')
    choice = int(input())
    while choice not in VALID_CHOISES:
        print('Invalid option.Please try again')
        choice = int(input())
return choice


def change_wav_file():
    choice = menu()
    if choice == 1:
        print('Please write the name of the file you would like to read')

change_wav_file()

0 个答案:

没有答案