fileOk = True filesList = db.printFilesList(dirList[dirChoice]) for f in filesList: print f #Réalisation de l'analyse pass elif choice == 3: choice3 = -1 while( not choice3 in range(1,2) ): try: choice3 = int(input("Que voulez-vous faire ?\n1-Supprimer un fichier\n2-Supprimer un wav\n")) except NameError: print "Ceci n'est pas un nombre !" if choice3 == 1: print "Fichiers : " filesList = db.printDirFiles() dirName = "storage/" elif choice3 == 2: print "Dossiers des waves : " filesList = db.printDirFiles("waves/") dirName = "waves/" fileChoice = -1 while( not fileChoice in range(len(filesList)) ): try: fileChoice = int( input( "Choisissez un fichier a traiter et entrez son numero : " ) ) except NameError: print "Ceci n'est pas un nombre !" db.deleteFileFromList(filesList[fileChoice],dirName) else: pass