Intersection of polysurfaces

I would like to select just the part where these 3 extrusions intersect and delete everything else. I have been reading the python manual to see how I can do this and so far I think the “booleaninstersection” command is my best choice or do you know another way to do this?
Below is a picture of the drawing

It sounds like you got your question answered, correct?
http://discourse.mcneel.com/t/polyline-script/26424/7