newbie urlopen() question
c825934 at vitgcab4.telstra.com.au
c825934 at vitgcab4.telstra.com.au
Tue Jul 18 18:32:28 EDT 2000
I have a simple file on my A drive (in the root) called 1.htm.
Why doesn't the following code succeed in opening the file? (It works
fine if I assign a valid http address to url. But when I assign the
address below the IOError occurs):
import urllib
url="a:1.htm"
try:
f = urllib.urlopen(url)
print f.read()
except IOError:
print "Could not open " + url
Any help much appreciated.
Peter Dann
Melbourne, Australia
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list