Sorry man, I don't know too much about Python/X integration, but I think you're going to need some module programed in C to get the functionality you desire. However, there may be one existing out there already.
Sorry I couldn't be of greater help.
-Wes
|