MCPcopy Create free account
hub / github.com/LCBOWER33/StegoScan / select_local_file

Function select_local_file

StegoScan.py:1428–1459  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1426 output_entry.config(foreground="white") # Ensure text is white
1427
1428 def select_local_file():
1429 def choose_file():
1430 selected_path = filedialog.askopenfilename()
1431 update_entry(selected_path)
1432 dialog.destroy()
1433
1434 def choose_folder():
1435 selected_path = filedialog.askdirectory()
1436 update_entry(selected_path)
1437 dialog.destroy()
1438
1439 def update_entry(selected_path):
1440 if selected_path:
1441 local_entry.delete(0, tk.END)
1442 local_entry.insert(0, selected_path)
1443 local_entry.config(foreground="white") # Ensure text is white
1444
1445 dialog = Toplevel(root)
1446 dialog.title("Select Option")
1447 dialog.configure(bg="#222")
1448 dialog.geometry("300x150")
1449 dialog.grab_set()
1450
1451 Label(dialog, text="Select a file or folder:", foreground="#222", bg="#222", font=("Arial", 12)).pack(pady=10)
1452
1453 btn_frame = tb.Frame(dialog)
1454 btn_frame.pack(pady=10)
1455
1456 tb.Button(btn_frame, text="Select File", command=choose_file, bootstyle="info-outline").pack(side="left",
1457 padx=10)
1458 tb.Button(btn_frame, text="Select Folder", command=choose_folder, bootstyle="info-outline").pack(side="left",
1459 padx=10)
1460
1461 fields = [
1462 ("URL(s):", "e.g. https://example.com"),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected