web programming ython is widely used when building websites and serves several different roles in this capacity firstpython scripts are often useful way to simply generate set of static html pages to be delivered by web server for examplea script can be used to take raw content and decorate it with additional features that you typically see on website (navigation barssidebarsadvertisementsstylesheetsetc this is mainly just matter of file handling and text processing--topics that have been covered in other sections of the book secondpython scripts are used to generate dynamic content for examplea website might operate using standard webserver such as apache but would use python scripts to dynamically handle certain kinds of requests this use of python is primarily associated with form processing for examplean html page might include form like thisyour name your email addresswithin the formthe action attribute names python script 'subscribe pythat will execute on the server when the form is submitted another common scenario involving dynamic content generation is with ajax (asynchronous javascript and xmlwith ajaxjavascript event handlers are associated with certain html elements on page for examplewhen the mouse hovers over specific document elementa javascript function might execute and send an http request to the webserver that gets processed (possibly by python scriptwhen the associated response is receivedanother javascript function executes to process the response data and displays the result there are many ways in which results might be returned for examplea server might return data as plaintextxmljsonor any number of other formats here is an example html document that illustrates one way to implement hover popup where moving the mouse over selected elements causes popup window to appear acme officials quiet after corruption probe popup border-bottom: px dashed greenpopup:hover background-color# fff lib fl ff