I can't understand why people would object to taking one single click (to select all and copy) instead of many steps (as Shog9 suggestedShog9 suggested).
And w.r.t. Ether's answerEther's answer, I don't think it matters how many lines of code you want to copy. I'd say it's particularly painful if there are only a few lines.
I've run into many sites with "copy code" button. phpBB has Select All.