A few points:
- TheBoth the python window and IDLE stores all variables created during each session. This can cause confusion when testing scripts.
- The python window allows you to access the TOC of your map document.
- The python window provides functionality that does not exist in a standalone script. Therefore, it is not the best practice to test an entire script in the python window. It is excellent for testing each portion of your script to ensure the tools do what you want.
- IDLE is not very user friendly. I recommend using pyscripter to create and test your scripts.