Shnupbups, I agree with Doyle, creepers do not recognize turtles as players to persue and detonate when close.
My first XP farm used a 24-block drop to weaken the mobs. A block at mob chest-height kept them contained in the drop. I initially placed my turtle right at the drop floor to attack the knees of the mobs as I would normally. Creepers cannot see me from this angle and so do not explode. Yet every once in a while a creeper would explode.
First trap design, side view
X . X X = glass
X . X . = air
X . < < = turtle facing direction
X X .
At the time, my xpgrind program was very simple, attacking as often as possible. I reasoned that possibly the turtle is hitting a creeper before it landed, detonating it. So I increased the attack delay to 2 seconds. This helped a lot but wasn't foolproof. So I moved the turtle back and coaxed the mobs toward the turtle with water:
Second trap design, side view
X . X
X . X X = glass or obsidian (I was getting tired of rebuilding)
X . . X . = air
X . . X X X X . < = turtle facing direction
. X . . . . . X ~ = water source block
. X ~ . . . . <
. . X X X X X .
No more explosions with this setup! However, a few mobs tended to hang out on the landing block, and when the turtle attacked, it would knockback the mobs, slowing things a bit, but my farm wasn't very efficient, so that didn't matter.
My 2nd farm is more efficient and I send them to the nether to collect. The grinding area is very similar to the past two:
Third trap design, side view
. O X .
X O . X X = glass, stone, etc
X O . X O = obsidian portal
X O . X . = air
. O . X < = turtle facing direction
. X . <
. . X .
Mobs fall two blocks from the portal and can't go anywhere. I have an optional sticky piston at mob chest-height to shuffle them into a single block in front of the turtle, which has not caused any explosions. In this setup, there is no active dropping, yet as with the first design, creepers detonate quite frequently. (I'm so glad turtles are blast-proof!) Are creepers jumping or are creepers still falling from the portal ledge? In a fourth design, I used a piston to move them into a corridor with a 2-block-high ceiling to keep them from jumping. This helped a little, but creepers still explode!
I'm running out of ideas, and I'm running out of glass and stone to replace my trap after the explosions, which brings me here. What's going on? Why are creepers exploding when turtle.attack()?
EDIT: Creepers have exploded with me 30+ blocks away, doing other things while the turtle grinds for me. I'm playing SSP in vanilla Minecraft 1.4.x except what's needed to run CC 1.4.
EDIT 2: I just tested in creative mode with a creeper dispenser on a clock. Punching creepers midair does not cause them to explode.