a newbie question

Eugene Perederey eugene.perederey at gmail.com
Sun Apr 12 10:46:34 EDT 2009


use urllib2

2009/4/12  <zhangle2002 at gmail.com>:
> 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. '
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Sincerely yours, Eugene Perederey



More information about the Python-list mailing list