"Content-Length" header

Justin justin__devine at hotmail.com
Mon Aug 30 16:28:50 EDT 2004


Ok I have now discovered the oddest problem ever.  Check this out it
seems that the same code that works outside of a for loop doesn't work
in one check it out.  Even though the first entry in the list
linklisttype is the same exact URL.


(THIS WORKS)

temp =
urlopen("http://www.ecs.soton.ac.uk/~harnad/Temp/Ariadne-RAE.doc")
print temp
temp2 = temp.info()
print temp2
temp3 = temp2.getheader("Content-Length")
print temp3

(THIS DOESN't)
for y in linklisttype:
x = y
temp = urlopen(x)
print temp
temp2 = temp.info()
print temp2
temp3 = temp2.getheader("Content-Length")
print temp3




More information about the Python-list mailing list