I am making a program to manage a database and i need a nice way of choosing the save locations of files within the program. I was wondering if it is possible to open windows explore from my program, select a folder to save a file in, enter the file name and return the file path as a string to the main program.

1

There are 1 best solutions below

0
On BEST ANSWER

Look up the Tkinter options in tkFileDialog

I don't think you necessarily need to put together a fully working GUI, you can simply call the method and select a folder location and then use that selected location in your code.

A simplistic example would be:

import Tkinter, tkFileDialog

root = Tkinter.Tk()

x = tkFileDialog.askopenfilename() # Can pass optional arguments for this...

root.destroy()