mirror of
https://codeberg.org/kazephil/Little_CAT_Helpers.git
synced 2023-08-25 14:05:45 +02:00
Add single file selection function.
This commit is contained in:
parent
16b56440a3
commit
78cf114d7e
@ -58,10 +58,20 @@ def select_folder(basepath, title):
|
||||
'''Ask user to choose a folder.'''
|
||||
|
||||
set_root_window()
|
||||
folder = Path(filedialog.askdirectory(initialdir=basepath,
|
||||
title=title))
|
||||
selected_folder = Path(filedialog.askdirectory(initialdir=basepath,
|
||||
title=title))
|
||||
|
||||
return folder
|
||||
return selected_folder
|
||||
|
||||
|
||||
def select_file(basepath, title):
|
||||
'''Ask the user to select a single file'''
|
||||
|
||||
set_root_window()
|
||||
selected_file = Path(filedialog.askopenfilename(initialdir=basepath,
|
||||
title=title))
|
||||
|
||||
return selected_file
|
||||
|
||||
|
||||
def get_save_file_name(basepath, filetypes, title):
|
||||
|
Loading…
Reference in New Issue
Block a user