Re: A more useful command-line wsgiref.simple_server?
PJ Eby <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> Fri, 30 Mar 2012 23:36:12 -0400
| Newsgroups | gmane.comp.python.web |
|---|---|
| Message-ID | <CALeMXf6V4m7PoTf30kboD9PDdeh4i4pY26iKBMW255a6t+gu=Q@mail.gmail.com> |
On Fri, Mar 30, 2012 at 5:12 PM, Graham Dumpleton < [email protected]> wrote: > Now when doing mod_wsgi, a similar method of loading each file > separately with a __name__ based on file system path was used to > ensure each was distinct when same file name used in different > directories. > Why give them a __name__ at all? Aren't they scripts, rather than modules? ISTM that not having a __name__ would also let things like pickles fail faster. That is, code that expected a module rather than a script would break right away. FWIW, in the past when pushing the idea of a WSGI script file being > the lowest common denominator, part of the reason I found I couldn't > get it accepted is that some people simply didn't understand how in > Python to load an arbitrary file by path name and construct a module > for it in memory, with magic __name__. They seemed to think that the > only way to import a code file was for it to have a .py extension and > for the directory to be in sys.path. So, due to ignorance of the > solution as to how to do it meant I got a push back from some people. > Who were you trying to get acceptance from? Web-SIG or Python-Dev? Framework devs or end-users? Is there a PEP? If implementation is a problem for people, could we just include a wsgiref utility for it? _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/gcpw-web-sig%40m.gmane.org