Home Ask Login Register

Developers Planet

Your answer is one click away!

Z.Chen February 2016

python 3 create a GUI to set directory in a program

I would like to create a GUI that pops up asking where to download a file using python. I would like it to be similar to the interface that Google Chrome uses when downloading a file as that looks pretty standard. Is there a default module or add on that I can use to create thus GUI? or will I have to create myself? any help would be appreciated.


Lindsay Ward February 2016

There are a number of GUI toolkits you could use, including:

  • Kivy (modern touch-enabled)
  • Tkinter (bundled with Python)

These have file chooser widgets, which you could use that would provide standard-looking interfaces to your file system.

How do you want to run this program?

thodnev February 2016

If You mean the dialog window, in which You chose where to put file, it's tkinter.filedialog (https://docs.python.org/3/library/tkinter.html), which would give the most native look and feel.

But if You mean the dialog, in which You chose whether to save file in default location or specify another one, there's no such widget, but You may build it on Your own. For that case You probably should dig into Chromium sources, to determine how exactly it acts(https://chromium.googlesource.com/)

Post Status

Asked in February 2016
Viewed 3,152 times
Voted 4
Answered 2 times


Leave an answer

Quote of the day: live life