python turtle import images code example
Example 1: python turtle import images
import turtle
from os import path
currentDir = os.abspath(path.curdir)
wn = turtle.Screen()
wn.setup(width=700,height=400)
wn.title("image test")
wn.addshape(currentDir+"\\Resources\\image.gif")
myImage = turtle.Turtle()
myImage.speed(0)
myImage.shape(currentDir+"\\Resources\\image.gif")
myImage.penup()
myImage.goto(0,0)
while True:
wn.update()
Example 2: python turtle import images
import turtle
from os import path
currentDir = os.abspath(path.curdir)
wn = turtle.Screen()
wn.setup(width=700,height=400)
wn.title("image test")
wn.addshape(currentDir+"\\Resources\\image.gif")
myImage = turtle.Turtle()
myImage.speed(0)
myImage.shape(currentDir+"\\Resources\\image.gif")
myImage.penup()
myImage.goto(0,0)
while True:
wn.update()