Submit
Path:
~
/
/
lib
/
python2.7
/
site-packages
/
docutils
/
File Content:
io.pyc
� >��Xc @ s� d Z d Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z m Z m Z d e f d � � YZ d e f d � � YZ d � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( s I/O classes provide a uniform API for low-level input and output. Subclasses exist for a variety of input/output mechanisms. t reStructuredTexti����N( t TransformSpec( t b( t locale_encodingt ErrorStringt ErrorOutputt InputErrorc B s e Z RS( ( t __name__t __module__( ( ( s- /tmp/pip-build-uEGWVr/docutils/docutils/io.pyR s t OutputErrorc B s e Z RS( ( R R ( ( ( s- /tmp/pip-build-uEGWVr/docutils/docutils/io.pyR s c C sE y# t j | j � t j | � k SWn t t t f k r@ d SXd S( sN Test, whether the encoding of `stream` matches `encoding`. Returns :None: if `encoding` or `stream.encoding` are not a valid encoding argument (e.g. ``None``) or `stream.encoding is missing. :True: if the encoding argument resolves to the same value as `encoding`, :False: if the encodings differ. N( t codecst lookupt encodingt LookupErrort AttributeErrort TypeErrort None( t streamR ( ( s- /tmp/pip-build-uEGWVr/docutils/docutils/io.pyt check_encoding s #t Inputc B s� e Z d Z d Z d Z d d d d d � Z d � Z d � Z d � Z e j e d � � Z e j d f e j d f e j d f f Z d � Z RS( s1 Abstract base class for input wrappers. t inputt strictc C sF | | _ | | _ | | _ | | _ | s9 | j | _ n d | _ d S( N( R t error_handlert sourcet source_patht default_source_pathR t successful_encoding( t selfR R R R ( ( s- /tmp/pip-build-uEGWVr/docutils/docutils/io.pyt __init__2 s c C s d | j | j | j f S( Ns %s: source=%r, source_path=%r( t __class__R R ( R ( ( s- /tmp/pip-build-uEGWVr/docutils/docutils/io.pyt __repr__F s c C s t � d S( N( t NotImplementedError( R ( ( s- /tmp/pip-build-uEGWVr/docutils/docutils/io.pyt readJ s c C sT | j r<