Making a star tetrahedron in python script I'm a noob in blender scripting. I ended up here after trying to make a suitable star tetrahedron for 3d printing (will split it in 3 separate parts) by just modeling it or sculpt it. I failed and couldn't find help anywhere. 
The idea is to make this smooth model without the hooks and corner bulges.

Found some old code for just one tetrahedron but it has rough cylinders and no corners. 

import bpy
from math import sqrt
from mathutils import Vector


def cylinder(a, b, radius=1.0):
    depth = (a-b).length
    location = a.lerp(b, 0.5)
    rotation = Vector((0, 0, 1)).rotation_difference(a-b).to_euler()

    bpy.ops.mesh.primitive_cylinder_add(
        depth=depth,
        location=location,
        rotation=rotation,
        radius=radius)


def tetrahedron_frame(radius=0.1, scale=1.0):
    s = sqrt(2)/3*scale
    t = -1/3*scale
    u = sqrt(6)/3*scale

    v = [(0, 0, scale), (2*s, 0, t), (-s, u, t), (-s, -u, t)]

    cylinder(Vector(v[0]), Vector(v[1]), radius=radius)
    cylinder(Vector(v[0]), Vector(v[2]), radius=radius)
    cylinder(Vector(v[0]), Vector(v[3]), radius=radius)
    cylinder(Vector(v[1]), Vector(v[2]), radius=radius)
    cylinder(Vector(v[2]), Vector(v[3]), radius=radius)
    cylinder(Vector(v[3]), Vector(v[1]), radius=radius)


tetrahedron_frame()


Any ideas on how to make this happen?
Scripting probably isn't a good option. That particular script just creates a bunch of cylinder objects and aligns them to approximate a tetrahedron. This isn't good topology and is most definitely not 3d-printable. To create a script that would actually do that, you would probably need to use the bmesh api. 

This here isn't scripting, but is an easy way to model a star tetrahedron than programming it.

Step 1: Add a cone. Set the vertices to 3 and the the depth to sqrt(2) (Blender will automatically parse it). 



Step 2: Go into Edit Mode, select everything, and hit W > Subdivide. Select all of the center faces and click Extrude Individual in the sidebar, then hit Enter without moving the mouse.



Step 3: Set the Pivot Center to Individual Origins.



Step 4: Press S, then 0, then Enter to collapse the faces down to vertices.



Step 5: In the sidebar, press Remove Doubles.

Step 6: Change the Pivot Center back to Median Point.

Step 7: With just the center vertices selected, press S, then 3, then Enter to move out the points. 



If you want to make it a wireframe like your reference image, you can use a wireframe modifier:



And you can smooth it out with some tweaking of settings and some SubSurf modifiers.