I tried to print a tool to remove the gear on a motor shaft (remembering to have seen one but can't find it again)...
But that didn't work (contrary to hammering it with an M4 screw while safely holded in a vice).
[edit 05/11/2012] Just use a vice : http://youtu.be/pT2zk--KqBo
Now may work :)
Print, try and tell us if that worked, or improve it, make it work, and share the lesson :)