How & where to best retrieve sudo password via a native GUI on a macOS Python-based app - (while maintaining an interactive output stream (stdout))
Ok, so the situation is this: I am building a macOS GUI App using Python and wx (wxphoenix). The user can use the GUI (say: script1 ) to launch a file-deletion process (contained in script2 ). In order to run successfully script2 needs to run with sudo rights. script2 will itterate over a long list of files and delete them. But I need it to communicate with the GUI contained in script1 after each round so that script1 can update the progressbar. In it's absolute most basic form my current working setup looks like this: Script1: import io from threading import Thread import subprocess import wx