I am working on a project which requires accessing some websites with and without tor enabled, and record the content differences. I am working on deepin (which is a linux based debian distro), and using Python 2.7 to accomplish the task. The problem is that I have to manually enable/disable tor, and change the system proxy settings every time I run the script. Now, I am aware that I can issue a shell command from Python itself to enable tor (service tor start), but I cannot figure out how to enable/disable the system proxy settings from Python.
I have already tried this, but no luck.