Do privilege escalation via other means instead of using sudo
Instead of launching sudo via subprocess.call() figure out how to elevate and do said tasks in pure python.
Instead of launching sudo via subprocess.call() figure out how to elevate and do said tasks in pure python.