How to build bezier path from points produced with python

I have a python script in a text DAT which outputs a bezier path. I am able to select all the points of the bezier path (on-curve, off-curve) which outputs something like shown below.

What is the most efficient way to visualise the points and bezier path in TD?
Is there an operator that I can pass all this information into that can reconstruct the bezier path?
Do the points have to be organised into a table?

Thanks in advance for any help:)

[(38.427734375, -1.806640625), (28.401642578125, -1.806640625), (20.336944580078125, 1.6682595214843752), (14.2333984375, 8.6181640625), (8.129852294921875, 15.568068603515625), (5.078125, 24.75580224609375), (5.078125, 36.181640625), (5.078125, 47.67258349609375), (8.146128173828124, 56.860317138671874), (14.2822265625, 63.7451171875), (20.418324951171876, 70.62991723632813), (28.613229980468752, 74.072265625), (38.8671875, 74.072265625), (49.0885927734375, 74.072265625), (57.27535986328125, 70.63805517578125), (63.427734375, 63.76953125), (69.58010888671875, 56.90100732421875), (72.65625, 47.73768750000001), (72.65625, 36.279296875), (72.65625, 24.593040527343753), (69.58010888671875, 15.323927490234375), (63.427734375, 8.4716796875), (57.27535986328125, 1.6194318847656253), (48.942109863281246, -1.806640625), (38.427734375, -1.806640625), (38.57421875, 5.859375), (45.96357861328124, 5.859375), (51.67641210937499, 8.520481201171876), (55.712890625, 13.8427734375), (59.74936914062501, 19.165065673828124), (61.767578125, 26.6763837890625), (61.767578125, 36.376953125), (61.767578125, 45.78455224609375), (59.74123120117188, 53.141249511718755), (55.6884765625, 58.447265625), (51.63572192382812, 63.753281738281245), (46.028681640624995, 66.40625), (38.8671875, 66.40625), (31.673141113281254, 66.40625), (26.057962890625, 63.745143798828124), (22.021484375, 58.4228515625), (17.985005859375, 53.100559326171876), (15.966796875, 45.70317236328125), (15.966796875, 36.23046875), (15.966796875, 26.7903173828125), (17.96872998046875, 19.3685166015625), (21.97265625, 13.96484375), (25.97658251953125, 8.561170898437501), (31.51038134765625, 5.859375), (38.57421875, 5.859375), (38.57421875, 5.859375)]

Hi Gor.

Try using a Script SOP.

(I’ve cut out the array contents for brevity).
Not sure this is closing the curve as you expect, so you may have to play around.

Some useful links:

docs.derivative.ca/Bezier_Class
docs.derivative.ca/ScriptSOP_Class

You’ll also want to open the Display Options dialog from the viewer to turn on points and hulls:

docs.derivative.ca/Display_Options

[code]
def onCook(scriptOp):
scriptOp.clear()

a = [(38.427734375....
bez = scriptOp.appendBezier(len(a), closed=True)

for vertex,coord in zip(bez,a):
	vertex.point.x = coord[0]
	vertex.point.y = coord[1]

return[/code]