Python Inside HTML:
Python Inside HTML behaves much like Microsoft's Active Server Pages, Sun's Java Server Pages and PHP : it's basically a HTML document, in which you insert portions of code written in a programming language - here Python In Python Inside HTML, these portions of code are separated from the HTML code inside special tags :<% and %>
Suppose you want to display the current date, you'll mix html and Python code this way : The current date is:
<% import datetime
With a text editor, write the code above and save it under time.pih in your Root Directory. Enter http://localhost/time.pih and see what happens.
You'll notice that the code inside the <% and %> tags is ordinary Python code, in which you can import modules, create and instanciate classes, use variables, read or write to the file system, etc.
Access to HTTP environment, to form fields, to the exceptions defined by Karrigell are made the same way as in Python Scripts.
See here for more details.