PYTHON CAVEATS #the following only runs twice for i in range(0,2): print str(i) int(something) cannot convert something from a decimal if something is a string such as "7.1". --Use float(something) instead to make sure. PTK-SPECIFIC ISSUE: Running program does nothing (console looks like it was last time you ran something) SOLUTION: You have to make sure the program is completely finished in the debugger (You can stop it with the red stop button at the top of the PTK Console window) before you push "Run Code" again, or else the old program will still be there. ISSUE:If you give a file object to the open command (instead of a filename) it will say "coercing to unicode" and will not tell you what is wrong. Here is the correction: BAD CODE: myfile=open(myfile,'r') SOLUTION: myfilename=part5test.txt myfile=open(myfilename,'r') ISSUE:Indents must match, and if they are hard tabs they aren't the same as equivalent number of spaces. SOLUTION:To match IDLE, all text editors you use should be set to convert tab to 4 spaces. ISSUE:If a thread is running that uses a frame, closing the frame will cause a crash since frame is still being used. The default OnClose event destroys the frame but does not end threads. Error is: "wx._core.PyDeadObjectError: The C++ part of the ... object has been deleted, attribute access no longer allowed" where ... is the frame or object name. SOLUTION: add an OnClose method to the frame that ends threads then destroys the window last. You must destroy the window, otherwise it cannot ever be closed! #class would be named whatever you named it (line should already exist): class MyFrame(wx.Frame): #... #(the following line should already exist) def __init__(self, *args, **kwds): #... #add the following line at the end of the __init__ method: self.Bind(wx.EVT_CLOSE, self.OnClose) #add the following method inside of the frame (def indented same as other def since defined inside frame): def OnClose(self,event): self.timer1.cancel() self.Destroy()