_compat

Module Contents

Classes

Functions

_check_if_pyc(fname)

Return True if the extension is .pyc, False if .py and None if otherwise

_get_codeobj(pyfile)

Returns the code object, given a python file

execfile_(fname, *args)
bytes_to_str(b)
unquote_to_wsgi_str(string)
execfile_(fname, *args)

Overriding PY2 execfile() implementation to support .pyc files

bytes_to_str(s)
_wrap_error(exc, mapping, key)
wrap_error(func, *args, **kw)
class BlockingIOError
class BrokenPipeError
class ChildProcessError
class ConnectionRefusedError
class InterruptedError
class ConnectionResetError
class ConnectionAbortedError
class PermissionError
class FileNotFoundError
class ProcessLookupError
wrap_error(func, *args, **kw)

Wrap socket.error, IOError, OSError, select.error to raise new specialized exceptions of Python 3.3 like InterruptedError (PEP 3151).

urlsplit(url, scheme="", allow_fragments=True)

Parse a URL into 5 components: <scheme>://<netloc>/<path>?<query>#<fragment> Return a 5-tuple: (scheme, netloc, path, query, fragment). Note that we don’t break the components up in smaller bits (e.g. netloc is a single string) and we don’t expand % escapes.

get_arity(f)
get_arity(f)
html_escape(s)
html_escape(s)