I opened python code from github
. I assumed it was python2.x
and got the above error when I tried to run it. From the reading I've seen Python 3 has depreciated urllib
itself and replaced it with a number of libraries including urllib.request
.
It looks like the code was written in python 3 (a confirmation from someone who knows would be appreciated.) At this point I don't want to move to Python 3 - I haven't researched what it would do to my existing code.
Thinking there should be a urllib
module for Python 2
, I searched Google (using "python2 urllib download") and did not find one. (It might have been hidden in the many answers since urllib
includes downloading functionality.) I looked in my Python27/lib
directory and didn't see it there.
Can I get a version of this module that runs on Python27
? Where and how?