Python CGI as persistent network client.
Ian Bicking
ianb at colorstudy.com
Tue Oct 21 02:23:31 EDT 2003
On Monday, October 20, 2003, at 11:57 PM, jbi130 at yahoo.com wrote:
> Not sure if the subject is a good description of what I'm after...
>
> I have a client-server architecture (current client in Java, server in
> C not that it really matters). I'm wanting to implement a web client
> with Python and need to do more than just connect and work with the
> database behind the server. I've already implemented a client module
> in Python which is module enough to work with many UI's (I have a
> ncurses based one and a wxPython based for experimental use).
>
> What I think I need to do is create a new connection to the server
> (using this module) when a new web session is started and retain this
> connection throughout the session until the user logs out or has been
> inactive for a certainn amount of time.
>
> The closest example I can think of is a web based IRC client,
> obviously these don't reconnect to the server everytime the user
> reloads the page.
>
> Are there any frameworks or Python tools aid in this sort of session
> persistence? I've looked at Zope but not sure how much I want to deal
> with DHTML, etc.
Many of the persistent frameworks can help you. If you really just
want one connection, then you'll have to use a threaded or asynchronous
framework -- with a multi-process framework you'll have to have several
connections, though you can reuse them.
CGI, mod_python, and SkunkWeb are the multi-process frameworks, which
you probably don't want -- several frameworks are also built ontop of
mod_python. I might recommend Webware, though there are many others.
See http://www.python.org/cgi-bin/moinmoin/WebProgramming for more.
--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the Python-list
mailing list