Is it possible to filter all outgoing connections through a HTTPS or SOCKS proxy? I have a script that users various apis & calls scripts that use mechanize/urllib. I'd like to filter every connection through a proxy, setting the proxy in my 'main' script (the one that calls all the apis). Is this possible?
to use tor with mechanize I use tor+polipo.
set polipo to use parent proxy socksParentProxy=localhost:9050 at confing file.
then use 
browser.set_proxies({"http": "localhost:8118"})
where 8118 is your polipo port.
so you are using polipo http proxy that uses sock to use tor 
hope it helps :)
Python proxy question