Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import psycopg2
  2. import turtle
  3.  
  4. conn=psycopg2.connect("dbname=guest user=guest password=guest")
  5. cur=conn.cursor()
  6.  
  7. centrox=-8.6223466370208
  8.  
  9. centroy=41.1603709427206
  10.  
  11. cur.execute("select st_x(st_transform(location,3763)),st_y(st_transform(location,3763)) from taxi_stands;")
  12. row=cur.fetchone()
  13.  
  14.  
  15. turtle.clear()
  16. while(row is not None):
  17. print(row)
  18. turtle.pendown()
  19. turtle.goto(row[0]-centrox,row[1]-centroy)
  20. turtle.penup()
  21. row=cur.fetchone()
  22.  
  23.  
  24. '''
  25. while row is not None:
  26. print(row)
  27. row=cur.fetchone()
  28. '''
  29. cur.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement