B “äî\)ã@s|dZddlZejdkr0eZZdZddlmZ n$ddl Z e jZdZdd„Ze d ƒj Z ejd krxddl Z iigd fd d „Z dS)aÊ Python 2/3 compatibility definitions. This module currently provides the following helper symbols: * bytes (name of byte string type; str in 2.x, bytes in 3.x) * b (function converting a string literal to an ASCII byte string; can be also used to convert a Unicode string into a byte string) * u_prefix (unicode repr prefix: 'u' in 2.x, '' in 3.x) (Required in docutils/test/test_publisher.py) * BytesIO (a StringIO class that works with bytestrings) éN)érÚu)ÚStringIOÚcCs4t|tƒr| d¡St|tƒr"|Std|fƒ‚dS)NÚlatin1zInvalid argument %r for b())Ú isinstanceÚstrÚencodeÚbytesÚ TypeError)Ús©r ú4/tmp/pip-build-uw_ogi45/docutils/docutils/_compat.pyÚbs    rÚio)éééÿÿÿÿcCst ||||¡S)zxCompatibility definition for Python 2.4. Silently ignore the `level` argument missing in Python < 2.5. )ÚbuiltinsÚ __import__)ÚnameÚglobalsÚlocalsÚfromlistÚlevelr r rr*sr) Ú__doc__ÚsysÚ version_inforrr Zu_prefixrrÚBytesIOrrr r r rÚs