Gustavo Córdova Avila
gustavo.cordova at q-voz.com
Mon Jan 10 18:10:14 EST 2005
On Monday 10 January 2005 16:03, Manfred Stienstra wrote: > On Fri, 2005-01-07 at 21:45 -0500, Jorey Bump wrote: > > - Obviously, you will need to use http://host:1234/foo.py/bar > > syntax Maybe I'm being dense, but ... why? If the op configures his own private apache and mod_python, I fail to see why he'll need to use that particular convention. I'd simply: <Location /application> Set-Handler python-program PythonPath "[\"/app/module/location\"] + sys.path" PythonHandler appmodule </Location> and in appmodule.py: BASE = "/application/" BASE_LEN = len(BASE) def handler(req): if req.uri.startswith("/application/"): # # Remove the leading /application/ from uri. # my_uri = req.uri[BASE_LEN:] # # handle the request in whatever way. # return apache.OK else: # request not meant for us. return apache.DECLINED So.... if you'll please clarify why the previous uglified URI is required.... I'll just stfu. :-) -gus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050110/37e73744/attachment.html
|