Package cherrypy :: Package lib
[hide private]
[frames] | no frames]

Package lib

source code

CherryPy Library

Submodules [hide private]

Classes [hide private]
  file_generator
Yield the given input (a file object) in chunks (default 64k).
Functions [hide private]
 
is_iterator(obj)
Returns a boolean indicating if the object provided implements the iterator protocol (i.e.
source code
 
is_closable_iterator(obj) source code
 
file_generator_limited(fileobj, count, chunk_size=65536)
Yield the given file object in chunks, stopping after `count` bytes has been emitted.
source code
 
set_vary_header(response, header_name)
Add a Vary header to a response
source code
Variables [hide private]
  __package__ = 'cherrypy.lib'
Function Details [hide private]

is_iterator(obj)

source code 

Returns a boolean indicating if the object provided implements the iterator protocol (i.e. like a generator). This will return false for objects which iterable, but not iterators themselves.

file_generator_limited(fileobj, count, chunk_size=65536)

source code 

Yield the given file object in chunks, stopping after `count` bytes has been emitted. Default chunk size is 64kB. (Core)