As with PythonWin, IDLE supports the concept of running and importing scripts. To run or import a script, the file must be opened in the text editor and Edit → Run Script or Edit → Import Module selected.
These features work the same as under PythonWin. Since we have experimented with these functions using PythonWin, we won’t bore you with a repeat for IDLE. However, you may still want to open the same sample script used for PythonWin and test the features using IDLE.
If a traceback is printed to the Python shell window, you can move the cursor to one of the error lines and select the Go to file/line option (from the Debug or right-click menus) to open the file.