[albatross-users] Standalone HTTP Albatross server

Matt Goodall matt at pollenation.net
Mon Jun 23 11:17:00 EST 2003


Hi,

Attached is the first cut at a simple, standalone HTTP server script for
Albatross apps. It's been written for 1.10pre1 although there seems to
be a bug in that version which stops it actually working. See my post of
19 Jun 2003 for more on the bug and a possible solution.

The script is working ok for me but it has only had minimal testing and
has some known limitations:

      * No file upload support. I will try to sort that out soon.
      * It uses the standard BaseHTTPServer module so it's not much more
        that a toy. It's ok for local development and as a very low use
        server i.e. for single user, web-based apps.

I'm posting this now in the hope that it is useful in its current form
(i.e. without file upload) and maybe to get some feedback.

"So how do I use it?", I hear you all ask. The easiest way is to run the
httpd.py script with the name of the App class and the port as the only
arguments. For instance:

    python httpd.py test.App 8080

would import the 'test' module, create an instance of the 'App' class
and run an HTTP server on port 8080.

Dave, Andrew - as I previously mentioned, this is all yours if you want
it but it's never going to perform well. An asyncore/Medusa/Twisted
implementation would almost certainly be better but I don't have time
for those right now ... sorry.

Cheers, Matt

-- 
Matt Goodall
Pollenation Internet Ltd, http://www.pollenation.net
e: matt at pollenation.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd.py
Type: text/x-python
Size: 3846 bytes
Desc: not available
URL: <http://www.object-craft.com.au/pipermail/albatross-users/attachments/20030623/1921df51/attachment.py>


More information about the Albatross-users mailing list