python - file opening dialog & drag and drop in pygame -
i want build little application; , has have sort of possibility load files. right copying path application, want build possibility to
- drop file outside gui and
- have file opening dialog.
is there way accomplish @ least 1 of requirements? because not want create non-native file opening dialog myself.
you can use file opening dialog tkinter.
to filename code be:
from tkinter.filedialog import askopenfilename ## or tkinter.filedialog import * tkinter import * root = tk() foo = askopenfilename() root.destroy() print(foo)
Comments
Post a Comment