File: //opt/alt/python27/lib/python2.7/site-packages/paste/progress.pyo
�
a�Nc           @   s�   d  Z  d d l Z d d l m Z d Z d Z d Z d Z d	 Z d
 e	 f d �  �  YZ
 d e	 f d
 �  �  YZ d e	 f d �  �  YZ d d g Z
 d e k r� d d l Z e j d e j � n  d S(   s~  
Upload Progress Monitor
This is a WSGI middleware component which monitors the status of files
being uploaded.  It includes a small query application which will return
a list of all files being uploaded by particular session/user.
>>> from paste.httpserver import serve
>>> from paste.urlmap import URLMap
>>> from paste.auth.basic import AuthBasicHandler
>>> from paste.debug.debugapp import SlowConsumer, SimpleApplication
>>> # from paste.progress import *
>>> realm = 'Test Realm'
>>> def authfunc(username, password):
...     return username == password
>>> map = URLMap({})
>>> ups = UploadProgressMonitor(map, threshold=1024)
>>> map['/upload'] = SlowConsumer()
>>> map['/simple'] = SimpleApplication()
>>> map['/report'] = UploadProgressReporter(ups)
>>> serve(AuthBasicHandler(ups, realm, authfunc))
serving on...
.. note::
   This is experimental, and will change in the future.
i����N(   t   catch_errorsi   i<