-2

我似乎无法加载图片我试过这个

image = "python_and_check_logo.gif"
msg = "Do you like this picture?"
choices = ["Yes","No","No opinion"]
reply = buttonbox(msg, image=image, choices=choices)

谁能帮我加载图片?

4

3 回答 3

1

只是问,但你有那个图像吗,如果你没有,那么它也不起作用你是否导入了easygui(如果你没有那么做)

于 2018-11-11T17:48:37.673 回答
1

您也可以尝试使用此格式加载另一张照片

image = "photo.gif"
于 2018-11-22T23:04:16.020 回答
1

阅读Easygui 文档以获得答案!我认为你必须选择这样的类型

from easygui import buttonbox
image = "Path\\To\\python_and_check_logo.gif"
title = "Choose Your Title"
msg = "Do you like this picture?"
choices = ["Yes","No","No opinion"]
reply = buttonbox(msg=msg, title=title, choices=(choices), image=image)
于 2019-07-15T16:41:36.180 回答