Python 3.x 在Tkinter和Python3中使用系统默认图标

Python 3.x 在Tkinter和Python3中使用系统默认图标,python-3.x,tkinter,python-imaging-library,Python 3.x,Tkinter,Python Imaging Library,我想使用已知任务的系统默认图标(复制、剪切、粘贴、文件新建、文件打开、退出、帮助等)。这取决于桌面环境中当前使用的图标集和/或使用的操作系统 Python是否提供了一种与平台无关的方式来获得这样的图标 下面是一些基于Tkinter的伪代码 #!/usr/bin/env python3 # -*- coding: utf-8 -*- from tkinter import * from tkinter import ttk from PIL import * root = Tk() imag

我想使用已知任务的系统默认图标(复制、剪切、粘贴、文件新建、文件打开、退出、帮助等)。这取决于桌面环境中当前使用的图标集和/或使用的操作系统

Python是否提供了一种与平台无关的方式来获得这样的图标

下面是一些基于Tkinter的伪代码

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from tkinter import *
from tkinter import ttk
from PIL import *

root = Tk()

image = image.open(DEFAULT_COPY_ICON)
image = ImageTk.PhotoImage(image)

button = Button(master=root, text='Copy', image=image))

root.mainloop()

PyGTK
有系统图标的名称,但可能仅适用于Linux。但是
PyGTK
不是
Tkinter
。您能为这些任务中的任何一项提供系统默认图标吗?例如,我质疑他们在Windows上的存在。我甚至不确定这是否只在Linux上可以实现。图标主题具有不同的格式(svg、png等)和不同的文件夹组织。此外,我认为查找当前主题的方法取决于桌面环境。@Nae MSDN列出了几个windows默认设置。编辑:用法