You have to use some method to read what you are opening:
url = urllib2.urlopen('someURL')
html = url.readlines()
for line in html:
    #At this level you already have a str in 'line'
    #do something
Also you have other methods: read, readline
Edit:
As I said in one of my comments in this thread, maybe you need to use BeautifulSoup to scrap what you want. 
So, I think this was already solved here.
You have to install BeautifulSoup:
pip install BeautifulSoup
Then you have to do what is in the example:
from bs4 import BeautifulSoup
import urllib2    
import re
html = urllib.urlopen('someURL').read()
soup = BeautifulSoup(html)
texts = soup.findAll(text=True)
def visible(element):
    if element.parent.name in ['style', 'script', '[document]', 'head', 'title']:
        return False
    elif re.match('<!--.*-->', str(element)):
        return False
    return True
visible_texts = filter(visible, texts)
And if you have some problem with ascii characters, you have to change str(element) to unicode(element) in the visible function.