I assume that you use applications, that respect the environment variables like
proxy_http, proxy_https, proxy_ftp etc.
There is no single configuration file or option as you might have seen on
Windows system.
Rather, as they are environment variables, they are added to a script that is
sourced when a user logs in and by doing so settings these.
The most promiment one on Linux (or many BSD or UNIX-like OSs) is /etc/profile.
So your Python script would need to alter this script to reflect the newly
detected proxies.
For example you would need to add lines like