The *.wsgi file is just a hook into your actual code and should be no more
that 15 or 20 lines of code. I've seen some that were less than 5 lines of
code. This hook file should call your framework or whatever you are using to
handle your site. I do all URI parsing in my code not the hook file.

-Carl

On Wed, Oct 22, 2008 at 9:17 AM, wmiller <[EMAIL PROTECTED]> wrote:

>
> just starting out with mod_wsgi on apache and I'm wondering, is it
> less than ideal to have separate *.wsgi files for each URL versus just
> one root *.wsgi file that parses and handles all the URLs for a
> website?
>
> In the sandbox environment I'm working in I have a separate *.wsgi
> file for each URL because it's an easy way to get started.  I'm
> guessing for performance and resource reasons, it won't scale very
> well - multiple Python interpretors running?
>
> I'd prefer to avoid using frameworks or middleware and just stay as
> low level and basic as possible, e.g. for each URL a simple file like
> this with additional code/functionality depending on requirements:
>
> def application(environ, start_response):
>    start_response('200 OK', [('content-type', 'text/html')])
>    HTML = "<html><body>%s</body></html>"
>    HTML %= "Hello world!"
>    return [HTML]
>
>
> -Walter
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to modwsgi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to