def shop1():
kitchen_shopping = Toplevel()
kitchen_shopping.title('Kitchen Shelves, Shelves, Shelves...!')
kitchen_shopping = open('Static Pages/kitchenshelf.html', 'r')
kitchen_list_items = Text(kitchen_shopping, width = 30, height = 10,
borderwidth = 2, relief = 'groove')
kitchen_list_items.pack(kitchen_shopping)
kitchen_items = findall(r'<title>\s<!\[CDATA\[(.*?)\]\]>', kitchen_shopping.read())
return print(kitchen_items)
所以我的问题是我尝试阅读 HTML 文档并返回所有&#39;标题&#39; 。显然,将来我希望将其格式化为文本框&#34; kitchen_list_items&#34;但是现在我只想把它打印出来。 出了什么问题?