Yeah, I probably shouldn't have given you that link. It is really more about parsing the html that you get rather than the intricacies of urllib.

One of the first things I would look at is this link. http://www.velocityreviews.com/forums/t326690-urllib-urllib2-what-is-the-difference-.html
It was helpful for me to understand the difference between urllib and urllib2 and what each can do. It's short, but simple.

Then check out the end of this page. http://docs.python.org/library/urllib.html It has a few examples of how to do simple stuff.

Unfortunately, my knowledge of urllib does not go beyond the simple...but I was able to make your code work. Check this out...

import urllib
pngfile = urllib.urlopen('http://www.shadowbox.110mb.com/images/ShadowBox.png')
filetowrite = open('ShadowBox.png','w')
filetowrite.write(pngfile.read())
This article has been dead for over six months. Start a new discussion instead.