Trees | Indices | Help |
|
---|
|
Miscellaneous WSGI-related Utilities
|
|||
FileWrapper Wrapper to convert file-like objects to iterables |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
True if D has a key k, else False |
|
||
|
Imports: posixpath
|
Shift a name from PATH_INFO to SCRIPT_NAME, returning it If there are no remaining path segments in PATH_INFO, return None. Note: 'environ' is modified in-place; use a copy if you need to keep the original PATH_INFO or SCRIPT_NAME. Note: when PATH_INFO is just a '/', this returns '' and appends a trailing '/' to SCRIPT_NAME, even though empty path segments are normally ignored, and SCRIPT_NAME doesn't normally end in a '/'. This is intentional behavior, to ensure that an application can tell the difference between '/x' and '/x/' when traversing to objects. |
Update 'environ' with trivial defaults for testing purposes This adds various parameters required for WSGI, including HTTP_HOST, SERVER_NAME, SERVER_PORT, REQUEST_METHOD, SCRIPT_NAME, PATH_INFO, and all of the wsgi.* variables. It only supplies default values, and does not replace any existing settings for these variables. This routine is intended to make it easier for unit tests of WSGI servers and applications to set up dummy environments. It should *not* be used by actual WSGI servers or applications, since the data is fake! |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Tue Jan 29 22:41:33 2008 | http://epydoc.sourceforge.net |