python how to add turtle in tkinter

Solutions on MaxInterview for python how to add turtle in tkinter by the best coders in the world

showing results for - "python how to add turtle in tkinter"
Jacopo
24 Aug 2016
1from tkinter import *
2from turtle import RawTurtle, TurtleScreen
3"""
4Will make a tk window and a TurtleScreen with a turtle in it
5"""
6root = Tk()              # the tk window
7can = Canvas(root)       # a canvas what will turn into turtle screen
8tsc = TurtleScreen(can)  # the screen inside tk window
9tur = RawTurtle(tsc)     # the turtle; what you can do any turtle stuff with
10