I have the following code:
f = urllib2.urlopen(url)
data = f.read()
f.close()
It's running on a machine with two network interfaces. I'd like to specify which interface I want the code to use. Specifically, I want it to use the one other than the one it is using by default... but I can figure out which is which if I can just pick the interface.
What's the easiest/best/most pythonic way to do this?