Documentation for mod_npy.
This documentation is for people using mod_npy.
| response module: |
| Functions: |
| flush() |
Flushes output buffer to client, after this no more headers or cookies can be sent as headers are already sent to client. |
| header(headerName, headerValue) |
Sends HTTP header to client, return True on success and False when the call fails. Warning: this function will return False is headers are already sent, so be sure to use it before sending any output to client. |
| out(text) |
Send text to client, Apache will buffer the output, so if you want to send it directly to client call flush(). |
| outln(text) |
Same as out(), but sends newline also. |
| redirect(to) |
Send redirect to address to to client, the script will terminate after call to this function using postExit(). |
| sessionDestroy() |
Clear session dict and send a cookie to clear session cookie, this function may fail to clear session cookie for the same reason as header(). |
| setContentType(ctype) |
Set 'Content-Type' header, should be called before any output is sent to client. |
| setCookies(cookies) |
Send cookies to client, argument is an instance of Cookie.SimpleCookie (which can hold multiple cookies). Same restrictions apply to this function as header(). |
| Variables: |
| VIA_PROXY |
1 is this is request via proxy. |
| request module: |
| Functions: |
| header(headerName) |
Get header value for named header, header name is case insensitive. |
| Variables: |
| COOKIES |
Dictionary of cookies from client, cookie name is used as key. |
| FILES |
Files uploaded using POST, file name is used as key, and file content as value. |
| GET |
Dictionary of variables from query string (passed after ? in URL). |
| HTTP_HOSTNAME |
Server host name (or what client sent as Host: header value). |
| HTTP_IP |
Server IP address. |
| HTTP_METHOD |
HTTP method used to access this file (may be 'POST' or 'GET'). |
| HTTP_PASSWORD |
User password supplied as part of HTTP authorization. |
| HTTP_PATH |
File part of requested URL. |
| HTTP_PORT |
Server port. |
| HTTP_QUERY |
Query string (part of URL after ?). |
| HTTP_REMOTE_HOSTNAME |
Client host name (may be empty). |
| HTTP_REMOTE_IP |
Client IP address. |
| HTTP_USER |
User name supplied as part of HTTP authorization. |
| POST |
Dictionary of variables passed in POST query. |
| PYSESSION |
Session id. |
| SESSION |
Dictionary of session variables. |
| HTTPS |
off for plain text comminucation, on for SSL enabled access. |
| SSL_* |
All usual SSL variables. |
| mod_npy module: |
| Functions: |
| exceptionHandler(type, value, traceback) |
Handler for unhandled exceptions. Check Python documentation for excepthook. |
| log(text) |
Log text to Apache error log. |
| postExit() |
Ask mod_npy to terminate the script. This function will not interrupt current Python code block. |
| Variables: |
| VERSION |
mod_npy version string. |