2009/3/21 Florian Bösch <[email protected]>:
>
> On Mar 21, 10:53 am, Graham Dumpleton <[email protected]>
> wrote:
>> blah blah blah <snip>
>> This is about as good as you are going
>> to get with Python. This isn't PHP where the application is thrown
>> away at the end of every request.
>
> Yadda yadda yadda, wrong, it _is_ like PHP where the application is
> thrown away after every request. Enjoy:
You don't need to act like a jerk to get attention here. Graham is
very responsive and I'm sure he will be glad to discuss all your
concerns. The mechanics of mod_wsgi are not easily understood. Even
very capable developers have written misconceptions about it. If you
focused your energy to learn how it really works in instead of taking
assumptions you would sure be able to contribute with a more
productive email exchange.
Regards, Clodoaldo
> !/usr/bin/env python
>
> import os, sys, signal
> import traceback
>
> here = os.path.dirname(__file__)
> if here not in sys.path:
> sys.path.insert(0, here)
>
> try:
> from webwork import Application, ConfigParser
> from lib import handlers, Database
> config_path = os.path.join(here, 'app.cfg')
> config = ConfigParser(config_path)
> db_url = config.get('db', 'url')
> db = Database(db_url)
> app = Application(handlers, db, config)
> def application(environ, start_response):
> if config.getboolean('debug', 'debug'):
> os.kill(os.getpid(), signal.SIGINT)
> return app(environ, start_response)
> except:
> data = traceback.format_exc()
> def appliaction(environ, start_response):
> os.kill(os.getpid(), signal.SIGINT)
> start_response('500 SERVER ERROR', [
> ('Content-Type', 'text/plain'),
> ])
> return [data]
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---