>In answer to Scott Chapman's question about standalone mode, I agree we
>need it to run in full standalone mode. It is important to me that spyce
>runs by itself for development purposes. When I'm developing, I don't
>want to have to get apache, mod_python, etc. up and running. I just want
>to bring up spyce to test files. I modified the spyceWWW.py file to allow
>real web server use. It's not fast enough for production, obviously, but
>it works well for development. Just replace the spyceHTTPhandler class
>with the following:
[ deleted code ]
Your initial coding suggested that you felt strongly about this feature.
:) So, I expanded the functionality of the built-in web server. I didn't
like your use the CGIHTTPServer class, because it's a security problem.
I built a different kind of infrastructure (see spyceWWW.py). I personally
don't think that CGI is necessary if you already have Spyce. You can
easily make a short Spyce script, that forks a process. The overhead for
this is minimal, and I expect that it will not be required too often. At
most, you can, of course, create a new cgi handler within the new
infrastructure for the built-in webserver, and bind it to .cgi extensions.
It is nice for non-Spyce files to not be processed by the Spyce engine,
and simply be returned with their correct MIME Content-type header. Not
only does this speed things up, but also avoids the occasional "syntax
error" message when the file contains a random '[[' or '<%' sequence. So,
this is now implemented. Files ending with .spy are processed via the
spyce handler. All other files are processed via the dump handler. (See
the documentation for details, but it does what you'd expect.) I've also
added some options relating to the webserver in the runtime configuration
The webserver even knows how to display directory listings. I think that
this should be satisfactory for most applications.
All the best,