title: Python (PyScripter) Prevent "Not Responding" windows when running programs with errors
body: <p>I am using Windows 10, PyScripter 2.6, Python 3.4.4.</p>
  
  <p>I'm new to programing. I am learning python and creating programs with the turtle module.</p>
  
  <p>The turtle module creates a window and has turtles draw what you tell them to draw on the canvas of the window.</p>
  
  <p>When there is an error in my turtle program, the turtle window will go into a  "not responding" state. It crashes. I have to close it, it sends an error report to Microsoft, etc. etc.</p>
  
  <p><strong><em>My question is</strong>, is there some code or a some way to prevent the "turtle window" from crashing and going into a "not responding" state?</em></p>
  
  <p>I've tried debug and syntax check, but they do not prevent the problem.</p>
  
  <p>Part of me tells me this is just the way it is. If you write bad code, your programs will crash, but it just seems like, in the development environment, there would be a way to "deal" with these things.</p>
  
  <p>Thanks
  Tim</p>
  
  <p>Code and Error Messages</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>def main():
      pass
  
  if __name__ == '__main__':
      main()
  
  import turtle
  
  wn = turtle.Screen()
  wn.bgcolor("lightgreen")
  wn.title("Tess &amp; Alex")
  
  tess = turtle.Turtle()
  tess.color("hotpink")
  tess.pensize(5)
  
  alex = turtle.Turtle
  
  tess.forward(80)
  tess.left(120)
  tess.forward(80)
  tess.left(120)
  tess.forward(80)
  tess.left(120)
  
  tess.right(180)
  tess.forward(80)
  
  for x in [0,1,2,3]:
      alex.forward(50)
      alex.left(90)
  
  wn.mainloop()
  </code></pre>
  
  <p><strong>ERROR</strong></p>
  
  <p>Message File Name   Line    Position<br>
  Traceback<br>
          C:\py\3\program1.py 41<br>
  TypeError: forward() missing 1 required positional argument: 'distance'             </p>