On 2012-03-30, at 21:58 , Geoffrey Spear wrote: > On Fri, Mar 30, 2012 at 3:20 PM, Masklinn <maskl...@masklinn.net> wrote: >> 2. You seem to have asserted from the start that the default should be >> mounting modules, but I have seen no evidence or argument in favor of >> that so far. >> >> Defaulting to scripts not only works with both local modules and >> arbitrary files and follow cpython's (and most tools's) own behavior, >> but would also allows using -mwsgiref.simple_server as a shebang >> line. I find this to have quite a lot of value. > > I may be dense, but is there actually a use case for using a WSGI > application from a script? Presumably a script that defines a WSGI > application would also run it.
I would recommend going back to the original email of the thread where I described precisely the issue I have with this. And of course you could have the exact same objection about a module. The point is very much not to need the overhead of defining a (conditional) import and usage of simple_server, and keep the script/module itself focused on its job of defining the application. It also frees up the __main__ runner for other behaviors such as testing or CLI tools if needs be. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com