Colin Fox
cfox at cfconsulting.ca
Thu Jan 15 20:16:40 EST 2004
Hi, All. I've been playing with mod_python for a little while, and I love it! I do have one puzzle, though. What would be the best way of executing an on-disk module? It would be nice to be able to do something like: def handler(req): modname = req.filename if modname.endswith('.pyx'): import modname modname['main'](req) (I know this is very pseudo. It's just to convey what I mean.) But as far as I know, you can't use 'import' on a variable. I'd prefer to do this over invoking the python interpreter, of course, to keep everything within the mod_python execution environment. Any suggestions? Thanks, 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/6fd7bbd6/attachment.bin
|