I am trying to zoom the turtle window in python, but don't know how to proceed. Is there any feature which I can use to zoom the window ? Below is the code where I want to apply zoom. I'm also attaching zip file of code in case below code have indentation errors.
import random
import tkinter as Tkinter
import threading
import time
import turtle
class GUI():
def ParsePacket():
n = random.random()
latitude= 28+n
longitude=77+n
data =[latitude,longitude] #random Latitude and Longitude Generator of New Delhi
return data
def update():
while True:
z = GUI.ParsePacket()
x=z[0]
y=z[1]
print(x,y)
tracy.goto(x,y)
tracy.pendown()
if __name__ == "__main__":
root = Tkinter.Tk()
START_WIDTH = 700
START_HEIGHT = 700
frame = Tkinter.Frame(root, width=START_WIDTH, height=START_HEIGHT)
frame.grid_rowconfigure(0, weight=1)
frame.grid_columnconfigure(0, weight=1)
canvas = Tkinter.Canvas(frame, width=START_WIDTH, height=START_HEIGHT,
scrollregion=(0, 0, START_WIDTH, START_HEIGHT))
canvas.grid(row=0, column=0, sticky=Tkinter.N+Tkinter.S+Tkinter.E+Tkinter.W)
frame.pack()
tracy = turtle.RawTurtle(canvas, visible=False)
tracy.penup()
tracy.goto(50.126,8.605)
tracy.showturtle()
threading.Thread(target=update).start()
root.mainloop()