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?

23:10 Thursday, 07 Sep 2006 [#] [computers] (2 comments)

Posted by beza1e1 at Fri Sep 8 13:22:10 2006:
Works for me.
Posted by Dave Barry at Sat Sep 9 07:45:05 2006:
Works for me as well.  My guess is that it's hanging in mimetools on

--->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()

Name:


E-mail:


URL:


Add 2 and 3 (required):


Comment: