Is it possible to open 2 windows at the same time?
import tkinter as Tk
import random
import math
root = Tk.Tk()
canvas = Tk.Canvas(root)
background_image=Tk.PhotoImage(file="map.png")
canvas.pack(fill=Tk.BOTH, expand=1) # Stretch canvas to root window size.
image = canvas.create_image(0, 0, anchor=Tk.NW, image=background_image)
root.wm_geometry("794x370")
root.title('Map')
root.mainloop()
optimized_root = Tk.Tk()
optimized_canvas = Tk.Canvas(optimized_root)
optimized_root.pack(fill=Tk.BOTH, expand=1)
optimized_image = second.create_image(0, 0, anchor=Tk.NW, image=background_image)
optimized_root.wm_geometry("794x370")
optimized_root.title('Optimized Map')
optimized_root.mainloop()
I'm drawing lines on the first map and then optimizing them to different locations on the second map. That part isn't pictured here, but I want to just open both windows simultaneously and have the random starting points going towards their closest location in the second window. Everything works if I run one at a time, but I have to comment out the other half.