By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,034 Members | 2,000 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,034 IT Pros & Developers. It's quick & easy.

HTTP Open -v- File Read

P: n/a
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?

Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.