We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b552370 commit 69260a3Copy full SHA for 69260a3
utility.py
@@ -2,6 +2,8 @@
2
"""utility.py contains custom functions to be used in other scripts/modules"""
3
4
import os
5
+import tkinter as tk
6
+from tkinter import filedialog
7
8
def clear_console():
9
"""
@@ -11,3 +13,12 @@ def clear_console():
11
13
os.system('cls') # For Windows
12
14
else:
15
os.system('clear') # For Unix/Linux/Mac
16
+
17
+def select_folder(title="Select Folder"):
18
+ """
19
+ Opens a folder selection dialog and returns the selected folder path.
20
21
+ root = tk.Tk()
22
+ root.withdraw() # Hide the main window
23
+ folder_path = filedialog.askdirectory(title=title)
24
+ return folder_path
0 commit comments