I have a .dat file and it contains few polygons made of 2D points. And I tried to draw them with turtle library. I draw one of them Polygons as manual in sample code, but I was not able to use data and create polygon which is in a file and use turtle.
polygon = open("POLYGONS.dat", "r")
### print(polygon.read())
import turtle
### POLYGON ((111.3671875 4.130859375,114.2578125 4.130859375,114.2578125 18.447265625,111.3671875 18.447265625,111.3671875 4.130859375))
t = turtle.Turtle()
for i in range(20):
t.goto(111.3671875, 4.130859375)
t.goto(114.2578125, 4.130859375)
t.goto(114.2578125, 18.447265625)
t.goto(111.3671875, 18.447265625)
t.goto(111.3671875, 4.130859375)
also i wrote "for i in range(20)" for more time to observation, because after i run turtle it disappears immediatly.