diff options
| author | ianb <devnull@localhost> | 2005-05-22 06:41:19 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-05-22 06:41:19 +0000 |
| commit | 5892298f22273cc200334bca42292d2bacd5a3a5 (patch) | |
| tree | 526f806c40e37828a8118559418b24abfddb91e2 /paste | |
| parent | 006ca08cfa44c14086d88b63effcca73b8c515ff (diff) | |
| download | paste-5892298f22273cc200334bca42292d2bacd5a3a5.tar.gz | |
Added docs
Diffstat (limited to 'paste')
| -rw-r--r-- | paste/wsgilib.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/paste/wsgilib.py b/paste/wsgilib.py index b1da553..018f3f8 100644 --- a/paste/wsgilib.py +++ b/paste/wsgilib.py @@ -1,8 +1,17 @@ +""" +A module of many disparate routines. +""" + from Cookie import SimpleCookie from cStringIO import StringIO import mimetypes import os +__all__ = ['get_cookies', 'add_close', 'raw_interactive', + 'interactive', 'construct_url', 'error_body_response', + 'error_response', 'send_file', 'has_header', 'header_value', + 'path_info_split', 'path_info_pop'] + def get_cookies(environ): """ Gets a cookie object (which is a dictionary-like object) from the @@ -92,6 +101,10 @@ def raw_interactive(application, path_info='', **environ): errors.getvalue()) def interactive(*args, **kw): + """ + Runs the application interatively, wrapping `raw_interactive` but + returning the output in a formatted way. + """ status, headers, content, errors = raw_interactive(*args, **kw) full = StringIO() if errors: @@ -104,6 +117,7 @@ def interactive(*args, **kw): full.write('\n') full.write(content) return full.getvalue() +interactive.proxy = 'raw_interactive' def construct_url(environ, with_query_string=True, with_path_info=True): """ |
