I can use urllib.request module with Python 3.1. But when I execute the same program using Python 2.7, an error comes along the lines of;
AttributeError: \'module
Take a look at http://docs.python.org/library/urllib2.html.
The urllib2 module is the predecessor to urllib.request/urllib.error (it has been split into those modules in Python 3.0).
urllib2
urllib.request
urllib.error