I'm writing an application that sends files over network, I want to develop a custom protocol to not limit myself in term on feature richness (http wouldn't be appropriate, the nearest thing is the  bittorrent protocol maybe).
I've tried with twisted, I've built a good app but there's a bug in twisted that makes my GUI blocking, so I've to switch to another framework/strategy.
What do you suggest? Using raw sockets and using gtk mainloop (there are select-like functions in the toolkit) is too much difficult? 
It's viable running two mainloops in different threads?
Asking for suggestions
Two threads: one for the GUI, one for sending/receiving data. Tkinter would be a perfectly fine toolkit for this.  You don't need twisted or any other external libraries or toolkits -- what comes out of the box is sufficient to get the job done.
networking application and GUI in python