Titus Brown wrote:
QWIP2 is even simpler to use than QWIP:

---
import qwip2
app_obj = qwip2.QWIP2(create_publisher_fn)
---

so e.g. for the demo I just do

---
import qwip2
import quixote.demo.mini_demo
app_obj = qwip2.QWIP2(quixote.demo.create_publisher)

run_with_cgi(app_obj)
---

It seems to work without any problems, but I don't have any automated
tests for Quixote 2.0 yet, so I can't be sure.  Still, Quixote is pretty
regular in its output so I doubt there are any naster corner cases.

Cool. I think this should mean integration with Paste would involve extending paste.server.make_app (which clearly exemplifies the switch-statement style that OO is supposed to avoid ;):


if conf.get('publish_quixote'):
    from qwip2 import QWIP2
    app = conf['publish_quixote']
    if isinstance(app, (str, unicode)):
        from paste.util import import_string
        app = import_string.eval_import(app)
    if not isinstance(app, QWIP2):
        app = QWIP2(app)


This should allow 'publish_quixote = "quixote.demo.mini_demo"' in the server.conf to load the demo. I won't be able to test this until this evening, but that's my theory.


--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org
_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to