# --- Threading Functions (To keep GUI responsive) --- def start_scan_thread(self): """Starts scan in a separate thread.""" self.scan_btn.configure(state="disabled", text="Scanning...") self.progress_bar.set(0.1) thread = threading.Thread(target=self.scan_logic) thread.start()
If you want to take this project further:
# Update GUI after scan finishes mb_size = round(total_size / (1024 * 1024), 2) self.log(f"Scan complete. Found len(self.found_files) files.") self.log(f"Total recoverable space: mb_size MB") temp_cleaner gui
This guide focuses on because it offers the best balance of powerful system access (for deleting files) and modern GUI libraries.
self.scan_btn = ctk.CTkButton(self.btn_frame, text="Scan Files", command=self.start_scan_thread) self.scan_btn.grid(row=0, column=0, padx=5, sticky="ew") # --- Threading Functions (To keep GUI responsive)
# Scrollable Log Frame self.log_frame = ctk.CTkScrollableFrame(self, label_text="Activity Log") self.log_frame.grid(row=1, column=0, padx=20, pady=10, sticky="nsew")
: Always ensure you are using the most recent build (such as version v0.6.7) to ensure compatibility with the latest Windows updates. self.log(f"Cleaned deleted_count files.") if errors >
self.log(f"Cleaned deleted_count files.") if errors > 0: self.log(f"Failed to delete errors files (in use or protected).")
As a user, I want to scan for temporary files, preview them with sizes and locations, then select specific items/folders to clean instead of deleting everything at once.