0

I am trying to make the window my turtle graphics run in have geometry propagation, but when I have the following code:

from tkinter import *
import turtle

tk=Tk()
tk.grid_propagate()
turtle.pd
turtle.forward(100)
turtle.mainloop()

I get two windows, one with geometry propagation and no graphics, and one with graphics and no propagation.

Any help is appreciated.

Randoms
  • 2,110
  • 2
  • 20
  • 31
  • How exactly do you expect `turtle` and `tk` to interact? Where did this come from? – Veedrac Sep 27 '13 at 22:03
  • I had turtle running in the tkinter graphics window. – Randoms Sep 27 '13 at 23:06
  • @Veedrac: the [`turtle`](http://docs.python.org/2/library/turtle.html#module-turtle) module is titled "turtle graphics for tk". – martineau Sep 27 '13 at 23:12
  • @martineau Thanks, that explains it. Even so, how would the modules interact? I've seen no evidence that they can. – Veedrac Sep 27 '13 at 23:15
  • @Veedrac: Well, one way is by using [`turtle.getcanvas()`](http://docs.python.org/2/library/turtle.html#turtle.getcanvas) and then drawing on it with `tk.Canvas` methods. – martineau Sep 27 '13 at 23:18

0 Answers0