Well as you said you are pressing F5 to run the code I'm guessing you are using IDLE and it is IDLE crashing rather than python (Python and IDLE are not the same thing as many people new to python think they are). You could try another IDE and see if that helps. If this isn't the case then provide a little more information. What kind of code are you trying to run? What OS are you on? etc.
This post has been edited by Mekire: 24 February 2013 - 06:14 AM