[Tutor] database app

Christian Wyglendowski Christian.Wyglendowski at greenville.edu
Thu Jun 23 17:26:44 CEST 2005

> -----Original Message-----
> Hey there,

>     i have used the cgi module and dig it.
>     heres the deal,
>     my employer wants me to build a dynamic website that will 
> access a 
> database and display customer
>     information on web. ok, easy enough.

Looks like some others have pointed you in the right direction as far as
interfacing with Access.

For the "web" part of your application, I'd recommend CherryPy
(http://www.cherrypy.org).  It lets you write web applications in
python.  Example:

from time import ctime
from cherrypy import cpg

header = """

footer = """

class Site:
    def index(self):
        yield header % ('Index',)

        yield "<h3>Here is a header</h3>\n"
        yield "<p>Here is a paragraph.  It is currently is %s.</p>\n" %
        yield "<p>Here is a list of items</p>\n"
        yield "<ul>\n"
        for num in range(10):
            yield "<li>Item %s</li>\n" % (num,)
        yield "</ul>\n"

        yield footer
    index.exposed = True

cpg.root = Site()


That starts a webserver listening on port 8080 serving up your "index"
method at:

Anyhow, CherryPy is very easy to get a hold of.

Good luck with your web application.


More information about the Tutor mailing list