What you will find here is quite different from what's in the book , though the underlying mechanism is the same. I also added a Copyright. This was done mainly to clarify that Nsapy is indeed free, and to make sure that the name isn't used anywhere else. In fact, using Nsapy may be easier than CGI , once you figure it out. I also think it's easier and more flexible than LiveWire at this point.
Second advantage is speed.
Your Python script will run within the server itself, not as a separate process. Yet another advantage is the ability to perform initialization at server startup. Because Nsapy programs run within the server's memory space, all the variables persist for as long as the server is running. This was the main reason why I decided to get into this in the first place. I had a CGI application that loaded a bunch of lookup files with every hit.