copy python code of operation
At least in the lastest version of Blender, you can press Ctrl + C while overing any button (of sorts) to get the Data Path; This, however, doesn't work with Fields (text or numeric), since it copies the value that is already in the field. To fix this there's a "workaround", press RMB (right click) and select Copy Data Path, this however only copies a relative data path;

Also, it wasn't working in 2.72 for me, but I updated to 2.72b and it did.