after making an extrude in a cube, i want to rotate it without deforming the cube nor changing the size, in a MAC computer.
Your question is vague. Be absolutely specific in what you want. Include images, screenshots and blend files. If you just want to rotate the cube, in object mode select it and press R (rotate) or in edit mode select the vertices you want to rotate and press R (rotate). On the 3d view header select the appropriate pivot point. You can also enable the transform widget with the icon on the 3d view header
Have you posted in the blender coding forum because you want write code to do this. Assuming you don’t I’ve move it to Support / Basics and Interface
thanks @Richard Marklew