HTTP Open -v- File Read

just1coder at yahoo.ca just1coder at yahoo.ca
Mon Jul 4 17:05:24 EDT 2005


I am relatively new to Python ...

I have a script that uses urllib2 to open another XML file off of the
same server the PY file is living on.

urllib2.urlopen(url).read()

I changed a bit of it to use:
open(filename, 'r').read()

to open the file locally rather than making an HTTP call however the
file no longer works completely. It does load in the XML data without
fail but a certain section fails to render...

Is there any glaring mistake doing this?




More information about the Python-list mailing list