a newbie question

zhangle2002 at gmail.com zhangle2002 at gmail.com
Sun Apr 12 10:44:26 EDT 2009


hi,

I am just learning Python and get a problem when trying this example:

from urllib import urlopen
doc=urlopen("http://www.python.org").read()
print(doc)

when i run this, i was tould that 'cannot import name "urlopen"


What's wrong with this code? Do i need to place my code in some
specific directory? Thanks a lot. '



More information about the Python-list mailing list