> Date: Fri, 23 Dec 2011 14:04:17 +0100
> From: jugurtha.had...@gmail.com
> To: tutor@python.org
> Subject: Re: [Tutor] possibly a version error
>
> On 22/12/2011 18:13, Cranky Frankie wrote:
> > I got it to work:
> >
> > Use this for the import - import urll
On 22/12/2011 18:13, Cranky Frankie wrote:
I got it to work:
Use this for the import - import urllib.request
the use this: dom = minidom.parse(urllib.request.urlopen(url))
Here's the code that works in 3.2:
from pprint import pprint
import urllib.request
from xml.dom import minidom
WEATHER_U
I got it to work:
Use this for the import - import urllib.request
the use this: dom = minidom.parse(urllib.request.urlopen(url))
Here's the code that works in 3.2:
from pprint import pprint
import urllib.request
from xml.dom import minidom
WEATHER_URL = 'http://xml.weather.yahoo.com/forecastrs
It says to use import urllib2 but I get this error:
Traceback (most recent call last):
File "D:\MyDocs\Python\Element Tree for XML\weather.py", line 2, in
import urllib2
ImportError: No module named urllib2
On Thu, Dec 22, 2011 at 11:41 AM, Hugo Arts wrote:
> On Thu, Dec 22, 2011 at 5:33
On Thu, Dec 22, 2011 at 5:33 PM, Cranky Frankie
wrote:
> On the bottom of this web page:
>
> http://developer.yahoo.com/python/python-xml.html
>
> is a program that reads an RSS feed for the weather and then parses
> the XML to show weather data by a zip code you input. I'm trying to
> run this un
On the bottom of this web page:
http://developer.yahoo.com/python/python-xml.html
is a program that reads an RSS feed for the weather and then parses
the XML to show weather data by a zip code you input. I'm trying to
run this under Python 3.2 and get this error:
Traceback (most recent call last