notice that the output we read from the server is raw html code (normally rendered by browserwe can process this text with any of python' text-processing toolsincludingstring methods to search and split the re regular expression pattern-matching module full-blown html and xml parsing support in the standard libraryincluding html parseras well as sax-dom-and elementtree-style xml parsing tools when combined with such toolsthe urllib package is natural for variety of techniques--ad-hoc interactive testing of websitescustom client-side guis"screen scrapingof web page contentand automated regression testing systems for remote server-side cgi scripts formatting reply text one last fine pointbecause cgi scripts use text to communicate with clientsthey need to format their replies according to set of rules for instancenotice how example - adds blank line between the reply' header and its html by printing an explicit newline (\nin addition to the one print adds automaticallythis is required separator also note how the text inserted into the html reply is run through the cgi escape ( html escape in python see the note under "python html and url escape toolson page calljust in case the input includes character that is special in html for examplefigure - shows the reply we receive for form input bob smith--the in the middle becomes &lt;/ &gtin the replyand so doesn' interfere with real html code (use your browser' view source option to see this for yourself)if not escapedthe rest of the name would not be italicized figure - escaping html characters step adding web interface