|
Jim Peterson
jpeterson at ainet.com
Mon Nov 3 20:25:41 EST 2003
...
This is too funny! I'm still puzzled tho - previous installation required,
or at least accepted "/192.168.1.1/python/hello.py/say."
Anyway thanks very much. I was blind!
Bert Hughes
...
As a fellow struggling newbie, I can say that you were not blind.
Page 41, section 6.1.1 of the .pdf documentation illustrates a
SetHandler and a URL that requires the .py extension.
I paste it below. Sorry for the messed up formatting.
----------------------------------------------------
6.1.1 Introduction
To use the handler, you need the following lines in your configuration
<Directory /some/path}
SetHandler python-program
PythonHandler mod_python.publisher
</Directory>
This handler allows access to functions and variables within a module
via URL’s. For example, if you have the following module, called ‘hello.py’:
""" Publisher example """
def say(req, what="NOTHING"):
return "I am saying %s" % what
A URL http://www.mysite.com/hello.py/say would return ‘I am saying NOTHING’.
A URL http://www.mysite.com/hello.py/say?what=hello would return ‘I am
saying hello’.
---------------------------------------------------
I would have hit exactly the same problem if I hadn't just seen your thread.
Jim
|