Converting Python 3 libraries to be used in 2.7
Question: I'm following a tutorial which is coded in Python 3 and the author uses

    
    
    from urllib import parse
    

which gives me an error.

I've tried using Google and reading up about the library but can't seem to
find equivalent. All my code for project is in 2.7 so I would prefer not to
have to move over 3 just for this little bit.

Thanks for any help in advance.


Answer: Urllib has been restructured in python 3. What was
[urlparse](https://docs.python.org/2/library/urlparse.html#module-urlparse) in
python 2, is now urllib.parse (in python 3). So just use urlparse. You can
even do this: `import urlparse as parse` and the rest of the code should be
the same.

