I am currently in the following situation: my company has a proxy server for all external sites, but all internal hosts are direct connect only. Accessing them through the proxy will result in a proxy error. We have an internal pypi (added as extra index) where we host our own python packages, and of course we rely on the official pypi as well for officially released packages.
pip, the python package installer, honours the HTTP_PROXY variable, but the problem is that it is an all or nothing situation, meaning that either I can't connect to the internal pypi or the external one.
A browser normally handles this via proxy.pac, but a command line tool does not do this.
I don't have access to the proxy configuration and it's unlikely I can change it. I am asking on this SE because it's more likely to have tricks I am not familiar with to deal with this situation.