import pickle
import traceback
try:
with open('C:/Users/Andrew/Desktop/python/asistent/listfile.data', 'rb') as filehandle:
music_list = pickle.load(filehandle)
name_music = input("Введите название музыки: ")
put2music = input("Введите путь к музыке: ")
music_list.append(name_music)
music_list.append(put2music)
print(music_list)
with open('listfile.data', 'w') as filehandle:
pickle.dump(music_list, filehandle)
input()
with open('erros.log', 'w') as logs:
logs.write(e)
except:
logs.write(traceback.format_exc())