title: Python Turtle Graphics Keyboard Commands
body: <p>Anybody have any insight into controlling turtle graphics in python 2.7 with keyboard commands? I have done extensive research on this website and others and feel like I am doing the right thing but it just doesn't want to work for me. Below is what I have so far, can anyone tell me where I am going wrong???? </p>
  
  <pre><code>from turtle import *
  turtle.setup(500, 500)
  wn = turtle.Screen()
  wn.title("Turtle Keys")
  move = turtle.Turtle()
  showturtle()
  
  def k1():
  move.forward(45)
  
  def k2():
  move.left(45)
  
  def k3():
  move.right(45)
  
  def k4():
  move.back(45)
  
  wn.onkey(k1, "Up")
  wn.onkey(k2, "Left")
  wn.onkey(k3, "Right")
  wn.onkey(k4, "Down")
  
  wn.listen()
  </code></pre>