Server side newbie

Paul Rubin http
Fri Feb 3 06:57:35 EST 2006


jimlewis at emachineshop.com writes:
> Can you point me to sample code somewhere? If I had a server-side
> python script that increments the number in an edit control on clicking
> a button, I think I could take it from there.

Oh man, I hate to say this since it's not a good situation, but what
you're asking is a little bit more complicated than I think you're
expecting.  You need a server app with some notion of sessions (I
assume the user is supposed to be able to increment the number more
than once), so you have to know a bit about how servers and HTTP work,
plus how to write HTML, in addition to Python and some suitable server
side modules.  

Your best bet might be to use a web framework that already understands
sessions, but 1) you have to decide which one to use, since there are
several to choose from with differing sets of features; and 2) these
frameworks are designed for writing complex apps, so learning them may
be a bit much for something this simple.  But if your idea is to build
towards a real web app that does something more serious, then a
framework is the way to go.  

There's an old book about how database-backed web sites work, that
is pretty long, but well written.  It's online:
   http://philip.greenspun.com/panda



More information about the Python-list mailing list