[Web-SIG] A more useful command-line wsgiref.simple_server?
pje at telecommunity.com
Thu Mar 29 19:46:12 CEST 2012
On Thu, Mar 29, 2012 at 6:02 AM, Masklinn <masklinn at masklinn.net> wrote:
> * This would allow testing that the script has no error without having
> to go through mounting it in e.g. mod_wsgi
> * It would make trivial/test applications (e.g. dynamic responders to
> local JS) simpler to bootstrap as there would be no need for the
> half-dozen lines of wsgiref.simple_server bootstrapping and "hard"
> dependency on wsgiref,
Looks good to me. A few things I'd suggest adding:
* Add an option to serve a single request or forever
* Have it optionally launch any script in the webbrowser, not just the demo
* Allow use of a module instead of a script to obtain the application
* drop the ':' separator syntax, or else use os.pathsep so that it works
properly on Windows (where ':' can denote a drive letter)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Web-SIG