for macsee the part of some special mac instructions (page for way to start idle on cgi file easilyafter some initial work the first time on windowsthe easiest thing may be to use idleonwindows cmd you will want to open and save cgi files in idle then dialog windows in both windows and on mac have the same ideasbut different labels there is file type filter field for both it is labeled "formaton mac on windowsfor savingit is labeled "save as type"and for opening filethere is field it at the lower rightunlabeled if you want file ending in cgichange the filter field to all files (*for savingbe sure to enter the full file name you wantwith the extensioncgi if you forget and do not change the file filter when savinga pywill be added to your file name then you can rename it in an operating system file folder in the following diagramnow we have discussed both the top regular python sequence using the topthe bottom cgi specific sequenceand the common part in the middleas shown in both cases input data gets processed into the content of web page that goes to browser for any major application the main work is in the processing in the middle since that part is shared in both approachesit can be tested with simple python programbefore the starting and ending steps of the input and output flow are changed for the cgi client/server model the only part that still needs details explained is for web forms before going on to thatit is time to talk about handling errors in the cgi scripts we have been discussing the programs discussed here follow the simple patternget all input dataprocess input dataoutput results all together this pattern can be used both in testing web py version and in dynamic cgi versionusing processinput function common to both clearly more complicated patterns are often needed when inputprocessingand output are mixed in different waybut for these examples and for the exercisesthis is all we need errors in cgi scripts before you start running your own cgi scripts on the local serverit is important to understand how the different kinds of errors that you might make will be handled if you write regular python programeven one that produces web pageyou can write the code and run it in idleand idle will display all the kinds of errors with cgi scriptyou can still use idle to write your codebut you cannot run the cgi code in idleand errors show up in three different placesdepending on their typesyntax errors you are encouraged to check for syntax errors inside idleby using the menu sequence run -check module if you fail to do this and try running script with syntax errorthe error trace appears in the console window that appears when you start the local server better to have it fixed before thenwhile you are still dynamic web pages