Topic: How to send from Python a multipart file to Rails app?

I'm trying to send a file using Python to a Rails application. I'm using the code here … ipe/146306
The problem is that Webrick gets blocked (possibly a bug?) and nothing is received.
Anyone knows how to send a file from Python to a Rails application?
Can you think in another way of doing this? Simply using a POST will limit the size of the messages I want to send, are there any workaroud to this problem?
Any information will be really appreciated.