Colin Fox
cfox at cfconsulting.ca
Thu Jan 15 20:54:35 EST 2004
On Thu, 2004-01-15 at 20:29, Gregory (Grisha) Trubetskoy wrote: > from mod_python import apache > import os > > def handler(req): > > modname, ext = os.path.split(req.filename) > > if ext == '.pyx': > pyx_mod = apache.import_module(modname) > > > This code has not been tested :-) > > BTW - You should check out the publisher handler, it probably already does > what you're trying to do. > > Grisha I can't believe I got three answers all within 3 minutes. Now that's responsive! This worked, with slight mods (the split actually is (path, file), not (module, ext). I didn't know about the apache import function. Thanks! In case anyone's interested, I'm working on an Apache+XML based server. I've looked at and used Zope, PHP & cocoon, and I feel that this is a better way to go. Cocoon is probably closest to what I'm doing, but it's all java, and I'm a python guy. Once I've got the system on good footing, I'll open up the code for anyone else who may want to get involved. cf -- Colin Fox <cfox at cfconsulting.ca> CF Consulting Inc. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://oldchief.reply.net/pipermail/mod_python/attachments/20040115/730d6d41/attachment.bin
|