Making regular polyhedra in Blender using Python
It turns out it's easy (a bit hacky though) to make such regular shapes in Blender without using add-ons. Here's how:

Tetrahedron
Bring up the Add Mesh menu (Shift+A), and select a Cone. Set the number of Vertices to 3, leave Radius 1 at its default value of 1.000 and Radius 2 at 0.000. Now, set the Depth to square root of 2 =~ 1.414213

bpy.ops.mesh.primitive_cone_add(vertices=3, depth=1.414213)


Octahedron
This shape is the dual of the cube -- it has vertices where the cube has faces, and faces where the cube has vertices. To make it, first create a cube. Press TAB to switch to Edit mode. All the vertices should already be selected. Press W  to bring up the Specials menu, and select the Bevel function (or select it directly with CTRL+B). As you move the mouse, you will see each vertex of the cube turn into a triangular face; don’t bother getting the shape exactly right, simply press LMB to finish the drag. Then, look in the panel that should have appeared at the bottom of the Toolshelf on the left of the 3D view (press T to toggle its visibility); you should see an editable numeric field labelled “Offset”. Type the value 1.0 into this field, and that should exactly form the octahedron shape. Finally, bring up the Specials menu again, and this time select Remove Doubles.

bpy.ops.mesh.primitive_cube_add()
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.bevel(offset=1)
bpy.ops.mesh.remove_doubles()
bpy.ops.object.mode_set(mode='OBJECT')


Icosahedron
Bring up the Add Mesh menu, and select an Icosphere. Set the Subdivision to 1. Simple!

bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=1)


Dodecahedron
This shape is the dual of the icosahedron. To create it, make an icosahedron as above. Then do what you did to make an octahedron out of a cube: press TAB to switch to Edit mode. All the vertices should already be selected. Press W to bring up the Specials menu, and select the Bevel function. As with the octahedron, press LBM to finish the drag. Then set the Offset value to 0.607, the closest I could find. Then, bring up the Specials menu again, and this time select Remove Doubles. However, the default Merge Distance of 0.0001 will not be enough to remove all the doubled vertices; change this to 0.001, and you should see the message “Removed 40 vertices” briefly flash up.

bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=1)
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.bevel(offset=0.607)
bpy.ops.mesh.remove_doubles(threshold=0.001)
bpy.ops.object.mode_set(mode='OBJECT')


Source