Python Challenge
Here is a quick challenge for any Python gurus out there. Go and grab the Postr source (you'll need bzr) and run src/postr.py. Marvel at how simple it makes uploading images to Flickr, and how well it works.
Then run python setup.py install --prefix=prefix and run prefix/bin/postr. Try to upload an image and note how it hangs. A little debugging reveals that it is hanging on mimetools.choose_boundary(), and I have no idea why. I've probably made a stupid typo somewhere, can anyone spot the problem?
--->8---
hostid = socket.gethostbyname(socket.gethostname())
--->8---
which can happen if your /etc/hosts or dns doesn't match your hostname. So I'm led to believe, anyway. That, or the extremely unlikely case that it's blocked in taking the lock in _get_next_counter in choose_boundary()