I am trying to open a page using urllib2 but i keep getting connection timed out errors.
The line which i  am using is: 
f = urllib2.urlopen(url) 
exact error is:
URLError: <urlopen error [Errno 110] Connection timed out>
As a general strategy, open wireshark and watch the traffic generated by urllib2.urlopen(url). You may be able to see where the error is coming from.
urllib2 connection timed out error