You would have to define the polylines in a supported file format, e.g. VTK.
To create such a file from Python, you could do something like this:
import vtk
# define points x1,y1,z1, etc.
# add the actual points
points = vtk.vtkPoints()
points.InsertNextPoint(x1,y1,z1)
points.InsertNextPoint(x2,y2,z2)
points.InsertNextPoint(x3,y3,z3)
# define the lines
lines = vtk.vtkCellArray()
lines.InsertNextCell(3) # next line is composed of 3 vertices
lines.InsertCellPoint(0) # vertex 1
lines.InsertCellPoint(1) # vertex 2
lines.InsertCellPoint(2) # vertex 3
# assemble as surface mesh
mesh = vtk.vtkPolyData()
mesh.SetPoints(points)
mesh.SetLines(lines)
# write to file, supported by Sim4Life, Paraview, etc.
writer = vtk.vtkDataSetWriter()
writer.SetInputData(mesh)
writer.SetFileName(r"E:\temp\Foo.vtk")
writer.Write()