On Fri, Mar 30, 2012 at 5:12 PM, Graham Dumpleton < graham.dumple...@gmail.com> 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 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