<s> import os <EOL> from abc import ABCMeta <EOL> from numbers import Integral , Real <EOL> from sys import version_info as sys_version_info <EOL> try : <EOL> from cStringIO import StringIO <EOL> except ImportError : <EOL> try : <EOL> from StringIO import StringIO <EOL> except : <EOL> from io import StringIO <EOL> from io import BytesIO <EOL> try : <EOL> from ConfigParser import ConfigParser <EOL> except ImportError : <EOL> from configparser import ConfigParser <EOL> AbstractClass = ABCMeta ( '<STR_LIT>' , ( object , ) , { } ) <EOL> PY2 = sys_version_info [ <NUM_LIT:0> ] == <NUM_LIT:2> <EOL> PY3 = sys_version_info [ <NUM_LIT:0> ] == <NUM_LIT:3> <EOL> StringIO = StringIO <EOL> BytesIO = BytesIO if PY3 else StringIO <EOL> integer = ( Integral , ) <EOL> real = ( Real , ) <EOL> numeric = integer + real <EOL> string = ( str , ) if PY3 else ( str , unicode ) <EOL> bytes = ( bytes , ) <EOL> if PY2 : <EOL> def to_bytes ( st , encoding = '<STR_LIT:utf-8>' ) : <EOL> if isinstance ( st , unicode ) : <EOL> return st . encode ( encoding ) <EOL> elif isinstance ( st , bytes ) : <EOL> return st <EOL> else : <EOL> raise ValueError ( '<STR_LIT>' % type ( st ) ) <EOL> else : <EOL> def to_bytes ( st , encoding = '<STR_LIT:utf-8>' ) : <EOL> if isinstance ( st , str ) : <EOL> return st . encode ( encoding ) <EOL> elif isinstance ( st , bytes ) : <EOL> return st <EOL> else : <EOL> raise ValueError ( '<STR_LIT>' % type ( st ) ) <EOL> _PY3_EXEC_FUNCTION = """<STR_LIT>""" <EOL> if PY3 : <EOL> def exec_function ( ast , globals_map ) : <EOL> locals_map = globals_map <EOL> exec ( ast , globals_map , locals_map ) <EOL> return locals_map <EOL> else : <EOL> eval ( compile ( _PY3_EXEC_FUNCTION , "<STR_LIT>" , "<STR_LIT>" ) ) <EOL> if PY3 : <EOL> from contextlib import contextmanager , ExitStack <EOL> @ contextmanager <EOL> def nested ( * context_managers ) : <EOL> enters = [ ] <EOL> with ExitStack ( ) as stack : <EOL> for manager in context_managers : <EOL> enters . append ( stack . enter_context ( manager ) ) <EOL> yield tuple ( enters ) <EOL> else : <EOL> from contextlib import nested <EOL> if PY3 : <EOL> from urllib . request import pathname2url , url2pathname <EOL> else : <EOL> from urllib import pathname2url , url2pathname <EOL> WINDOWS = os . name == '<STR_LIT>' <EOL> __all__ = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT:string>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ) </s>
