[Tutor] CGI and Python

Wesley J. Chun wesc@alpha.ece.ucsb.edu
Tue, 1 Aug 2000 11:32:49 -0700 (PDT)

    > From: Catriona Johnston <kjohnston@rcsi.ie>
    > Date: Tue, 1 Aug 2000 14:42:22 +0100 
    > Thank you guys for all your previous help as a result I think I'm getting
    > places with Python. I have almost completed an application which calls on C
    > programs and wish to place it on the Web. Can any of you suggest a good
    > place to start learning about Python and CGI? Are there any good books /
    > on-line tutorials that I should know about?

hi kate,

yes, there seems to be a lack of CGI information in the current set of
Python books hence the reason why i am making a strong push at a "decent"
CGI intro into Core Python Programming, a project i'm working on for
Prentice Hall's Core Series.  the release date should be sometime late
summer or early fall if you can wait that long!

aside from the shameless self promotion, let's take a look at what *is*
out there right now:

--- Mark Lutz's first Python book, Python Programming from O'Reilly has a 2
    page CGI example with a couple of paragraphs describing the script which
    itself has no internal documentation.

--- The Quick Python book by Harms and McDonald has a chapter written by
    Robin Friedrich on HTMLgen, the maintainer of HTMLgen.  the HTMLgen
    module is one which you *may* use in CGI if the HTML you are generating
    gets more complex or if you just need to generate massive number of
    pages with common formatting.  it can also draw and render objects too.

--- Internet Programming with Python, one of the first Python books out
    there along with the above Lutz book, written mostly by Aaron Watters
    should have some CGI in it too, but it's out-of-print.

--- Brown's Python Annotated Archives has a couple of pages *telling* you
    about CGI, but doesn't really go into it at all, but *does* have a
    section on how to set a web *server* in Python which can process CGI.
    There is also a massive example (the FAQ Wizard script by Guido) which
    Brown annotates but is long and certainly not an intro to CGI.

--- Beazley's Python Essential Reference book is just that... a reference.
    there is a snippet of CGI code there as well as a brief explanation,
    but not much more than that.  it is for reference, not for learning.
    This is also applicable to the Python Library Reference by Guido.

Neither of O'Reilly's Learning Python or Python Programming on Win32, nor
Grayson's Tkinter have anything on CGI.  I don't have any idea regarding
(Altom and Chapman)'s book or Ivan's book (Ivan?).

In contrast, i've been motivated with questions like yours which pop up
every now and then to create a separate chapter entrily devoted to CGI pro-
gramming and in it, to provide an example that starts out simple and builds
to something a little more complex.  there will be lots of screen captures
too so that you can see what's going on.  finally, there will be a more
"advanced" section towards the end which does the complicated stuff that
everyone wants to do, like cookies, multivalued fields, and file uploads
with multipart data.  sorry that the book isn't out yet... trying to get
the weeds out of it right NOW!	;-)

hope this helps!!


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

"Core Python Programming", Prentice Hall PTR, TBP Summer/Fall 2000

Python Books:	http://www.softpro.com/languages-python.html

wesley.j.chun :: wesc@alpha.ece.ucsb.edu
cyberweb.consulting :: silicon.valley, ca