<s> """<STR_LIT>""" <EOL> import operator <EOL> import sys <EOL> import types <EOL> __author__ = "<STR_LIT>" <EOL> __version__ = "<STR_LIT>" <EOL> PY2 = sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:2> <EOL> PY3 = sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:3> <EOL> if PY3 : <EOL> string_types = str , <EOL> integer_types = int , <EOL> class_types = type , <EOL> text_type = str <EOL> binary_type = bytes <EOL> MAXSIZE = sys . maxsize <EOL> else : <EOL> string_types = basestring , <EOL> integer_types = ( int , long ) <EOL> class_types = ( type , types . ClassType ) <EOL> text_type = unicode <EOL> binary_type = str <EOL> if sys . platform . startswith ( "<STR_LIT>" ) : <EOL> MAXSIZE = int ( ( <NUM_LIT:1> << <NUM_LIT> ) - <NUM_LIT:1> ) <EOL> else : <EOL> class X ( object ) : <EOL> def __len__ ( self ) : <EOL> return <NUM_LIT:1> << <NUM_LIT> <EOL> try : <EOL> len ( X ( ) ) <EOL> except OverflowError : <EOL> MAXSIZE = int ( ( <NUM_LIT:1> << <NUM_LIT> ) - <NUM_LIT:1> ) <EOL> else : <EOL> MAXSIZE = int ( ( <NUM_LIT:1> << <NUM_LIT> ) - <NUM_LIT:1> ) <EOL> del X <EOL> def _add_doc ( func , doc ) : <EOL> """<STR_LIT>""" <EOL> func . __doc__ = doc <EOL> def _import_module ( name ) : <EOL> """<STR_LIT>""" <EOL> __import__ ( name ) <EOL> return sys . modules [ name ] <EOL> class _LazyDescr ( object ) : <EOL> def __init__ ( self , name ) : <EOL> self . name = name <EOL> def __get__ ( self , obj , tp ) : <EOL> result = self . _resolve ( ) <EOL> setattr ( obj , self . name , result ) <EOL> delattr ( tp , self . name ) <EOL> return result <EOL> class MovedModule ( _LazyDescr ) : <EOL> def __init__ ( self , name , old , new = None ) : <EOL> super ( MovedModule , self ) . __init__ ( name ) <EOL> if PY3 : <EOL> if new is None : <EOL> new = name <EOL> self . mod = new <EOL> else : <EOL> self . mod = old <EOL> def _resolve ( self ) : <EOL> return _import_module ( self . mod ) <EOL> class MovedAttribute ( _LazyDescr ) : <EOL> def __init__ ( self , name , old_mod , new_mod , old_attr = None , new_attr = None ) : <EOL> super ( MovedAttribute , self ) . __init__ ( name ) <EOL> if PY3 : <EOL> if new_mod is None : <EOL> new_mod = name <EOL> self . mod = new_mod <EOL> if new_attr is None : <EOL> if old_attr is None : <EOL> new_attr = name <EOL> else : <EOL> new_attr = old_attr <EOL> self . attr = new_attr <EOL> else : <EOL> self . mod = old_mod <EOL> if old_attr is None : <EOL> old_attr = name <EOL> self . attr = old_attr <EOL> def _resolve ( self ) : <EOL> module = _import_module ( self . mod ) <EOL> return getattr ( module , self . attr ) <EOL> class _MovedItems ( types . ModuleType ) : <EOL> """<STR_LIT>""" <EOL> _moved_attributes = [ <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT:input>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:input>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ] <EOL> for attr in _moved_attributes : <EOL> setattr ( _MovedItems , attr . name , attr ) <EOL> del attr <EOL> moves = sys . modules [ __name__ + "<STR_LIT>" ] = _MovedItems ( "<STR_LIT>" ) <EOL> class Module_six_moves_urllib_parse ( types . ModuleType ) : <EOL> """<STR_LIT>""" <EOL> _urllib_parse_moved_attributes = [ <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ] <EOL> for attr in _urllib_parse_moved_attributes : <EOL> setattr ( Module_six_moves_urllib_parse , attr . name , attr ) <EOL> del attr <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_parse ( "<STR_LIT>" ) <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_parse ( "<STR_LIT>" ) <EOL> class Module_six_moves_urllib_error ( types . ModuleType ) : <EOL> """<STR_LIT>""" <EOL> _urllib_error_moved_attributes = [ <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ] <EOL> for attr in _urllib_error_moved_attributes : <EOL> setattr ( Module_six_moves_urllib_error , attr . name , attr ) <EOL> del attr <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_error ( "<STR_LIT>" ) <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_error ( "<STR_LIT>" ) <EOL> class Module_six_moves_urllib_request ( types . ModuleType ) : <EOL> """<STR_LIT>""" <EOL> _urllib_request_moved_attributes = [ <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ] <EOL> for attr in _urllib_request_moved_attributes : <EOL> setattr ( Module_six_moves_urllib_request , attr . name , attr ) <EOL> del attr <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_request ( "<STR_LIT>" ) <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_request ( "<STR_LIT>" ) <EOL> class Module_six_moves_urllib_response ( types . ModuleType ) : <EOL> """<STR_LIT>""" <EOL> _urllib_response_moved_attributes = [ <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ] <EOL> for attr in _urllib_response_moved_attributes : <EOL> setattr ( Module_six_moves_urllib_response , attr . name , attr ) <EOL> del attr <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_response ( "<STR_LIT>" ) <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_response ( "<STR_LIT>" ) <EOL> class Module_six_moves_urllib_robotparser ( types . ModuleType ) : <EOL> """<STR_LIT>""" <EOL> _urllib_robotparser_moved_attributes = [ <EOL> MovedAttribute ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ] <EOL> for attr in _urllib_robotparser_moved_attributes : <EOL> setattr ( Module_six_moves_urllib_robotparser , attr . name , attr ) <EOL> del attr <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_robotparser ( "<STR_LIT>" ) <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib_robotparser ( "<STR_LIT>" ) <EOL> class Module_six_moves_urllib ( types . ModuleType ) : <EOL> """<STR_LIT>""" <EOL> parse = sys . modules [ __name__ + "<STR_LIT>" ] <EOL> error = sys . modules [ __name__ + "<STR_LIT>" ] <EOL> request = sys . modules [ __name__ + "<STR_LIT>" ] <EOL> response = sys . modules [ __name__ + "<STR_LIT>" ] <EOL> robotparser = sys . modules [ __name__ + "<STR_LIT>" ] <EOL> sys . modules [ __name__ + "<STR_LIT>" ] = Module_six_moves_urllib ( "<STR_LIT>" ) <EOL> def add_move ( move ) : <EOL> """<STR_LIT>""" <EOL> setattr ( _MovedItems , move . name , move ) <EOL> def remove_move ( name ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> delattr ( _MovedItems , name ) <EOL> except AttributeError : <EOL> try : <EOL> del moves . __dict__ [ name ] <EOL> except KeyError : <EOL> raise AttributeError ( "<STR_LIT>" % ( name , ) ) <EOL> if PY3 : <EOL> _meth_func = "<STR_LIT>" <EOL> _meth_self = "<STR_LIT>" <EOL> _func_closure = "<STR_LIT>" <EOL> _func_code = "<STR_LIT>" <EOL> _func_defaults = "<STR_LIT>" <EOL> _func_globals = "<STR_LIT>" <EOL> _iterkeys = "<STR_LIT>" <EOL> _itervalues = "<STR_LIT>" <EOL> _iteritems = "<STR_LIT>" <EOL> _iterlists = "<STR_LIT>" <EOL> else : <EOL> _meth_func = "<STR_LIT>" <EOL> _meth_self = "<STR_LIT>" <EOL> _func_closure = "<STR_LIT>" <EOL> _func_code = "<STR_LIT>" <EOL> _func_defaults = "<STR_LIT>" <EOL> _func_globals = "<STR_LIT>" <EOL> _iterkeys = "<STR_LIT>" <EOL> _itervalues = "<STR_LIT>" <EOL> _iteritems = "<STR_LIT>" <EOL> _iterlists = "<STR_LIT>" <EOL> try : <EOL> advance_iterator = next <EOL> except NameError : <EOL> def advance_iterator ( it ) : <EOL> return it . next ( ) <EOL> next = advance_iterator <EOL> try : <EOL> callable = callable <EOL> except NameError : <EOL> def callable ( obj ) : <EOL> return any ( "<STR_LIT>" in klass . __dict__ for klass in type ( obj ) . __mro__ ) <EOL> if PY3 : <EOL> def get_unbound_function ( unbound ) : <EOL> return unbound <EOL> create_bound_method = types . MethodType <EOL> Iterator = object <EOL> else : <EOL> def get_unbound_function ( unbound ) : <EOL> return unbound . im_func <EOL> def create_bound_method ( func , obj ) : <EOL> return types . MethodType ( func , obj , obj . __class__ ) <EOL> class Iterator ( object ) : <EOL> def next ( self ) : <EOL> return type ( self ) . __next__ ( self ) <EOL> callable = callable <EOL> _add_doc ( get_unbound_function , <EOL> """<STR_LIT>""" ) <EOL> get_method_function = operator . attrgetter ( _meth_func ) <EOL> get_method_self = operator . attrgetter ( _meth_self ) <EOL> get_function_closure = operator . attrgetter ( _func_closure ) <EOL> get_function_code = operator . attrgetter ( _func_code ) <EOL> get_function_defaults = operator . attrgetter ( _func_defaults ) <EOL> get_function_globals = operator . attrgetter ( _func_globals ) <EOL> def iterkeys ( d , ** kw ) : <EOL> """<STR_LIT>""" <EOL> return iter ( getattr ( d , _iterkeys ) ( ** kw ) ) <EOL> def itervalues ( d , ** kw ) : <EOL> """<STR_LIT>""" <EOL> return iter ( getattr ( d , _itervalues ) ( ** kw ) ) <EOL> def iteritems ( d , ** kw ) : <EOL> """<STR_LIT>""" <EOL> return iter ( getattr ( d , _iteritems ) ( ** kw ) ) <EOL> def iterlists ( d , ** kw ) : <EOL> """<STR_LIT>""" <EOL> return iter ( getattr ( d , _iterlists ) ( ** kw ) ) <EOL> if PY3 : <EOL> def b ( s ) : <EOL> return s . encode ( "<STR_LIT>" ) <EOL> def u ( s ) : <EOL> return s <EOL> unichr = chr <EOL> if sys . version_info [ <NUM_LIT:1> ] <= <NUM_LIT:1> : <EOL> def int2byte ( i ) : <EOL> return bytes ( ( i , ) ) <EOL> else : <EOL> int2byte = operator . methodcaller ( "<STR_LIT>" , <NUM_LIT:1> , "<STR_LIT>" ) <EOL> byte2int = operator . itemgetter ( <NUM_LIT:0> ) <EOL> indexbytes = operator . getitem <EOL> iterbytes = iter <EOL> import io <EOL> StringIO = io . StringIO <EOL> BytesIO = io . BytesIO <EOL> else : <EOL> def b ( s ) : <EOL> return s <EOL> def u ( s ) : <EOL> return unicode ( s , "<STR_LIT>" ) <EOL> unichr = unichr <EOL> int2byte = chr <EOL> def byte2int ( bs ) : <EOL> return ord ( bs [ <NUM_LIT:0> ] ) <EOL> def indexbytes ( buf , i ) : <EOL> return ord ( buf [ i ] ) <EOL> def iterbytes ( buf ) : <EOL> return ( ord ( byte ) for byte in buf ) <EOL> import StringIO <EOL> StringIO = BytesIO = StringIO . StringIO <EOL> _add_doc ( b , """<STR_LIT>""" ) <EOL> _add_doc ( u , """<STR_LIT>""" ) <EOL> if PY3 : <EOL> import builtins <EOL> exec_ = getattr ( builtins , "<STR_LIT>" ) <EOL> def reraise ( tp , value , tb = None ) : <EOL> if value . __traceback__ is not tb : <EOL> raise value . with_traceback ( tb ) <EOL> raise value <EOL> print_ = getattr ( builtins , "<STR_LIT>" ) <EOL> del builtins <EOL> else : <EOL> def exec_ ( _code_ , _globs_ = None , _locs_ = None ) : <EOL> """<STR_LIT>""" <EOL> if _globs_ is None : <EOL> frame = sys . _getframe ( <NUM_LIT:1> ) <EOL> _globs_ = frame . f_globals <EOL> if _locs_ is None : <EOL> _locs_ = frame . f_locals <EOL> del frame <EOL> elif _locs_ is None : <EOL> _locs_ = _globs_ <EOL> exec ( """<STR_LIT>""" ) <EOL> exec_ ( """<STR_LIT>""" ) <EOL> def print_ ( * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> fp = kwargs . pop ( "<STR_LIT:file>" , sys . stdout ) <EOL> if fp is None : <EOL> return <EOL> def write ( data ) : <EOL> if not isinstance ( data , basestring ) : <EOL> data = str ( data ) <EOL> fp . write ( data ) <EOL> want_unicode = False <EOL> sep = kwargs . pop ( "<STR_LIT>" , None ) <EOL> if sep is not None : <EOL> if isinstance ( sep , unicode ) : <EOL> want_unicode = True <EOL> elif not isinstance ( sep , str ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> end = kwargs . pop ( "<STR_LIT:end>" , None ) <EOL> if end is not None : <EOL> if isinstance ( end , unicode ) : <EOL> want_unicode = True <EOL> elif not isinstance ( end , str ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> if kwargs : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> if not want_unicode : <EOL> for arg in args : <EOL> if isinstance ( arg , unicode ) : <EOL> want_unicode = True <EOL> break <EOL> if want_unicode : <EOL> newline = unicode ( "<STR_LIT:\n>" ) <EOL> space = unicode ( "<STR_LIT:U+0020>" ) <EOL> else : <EOL> newline = "<STR_LIT:\n>" <EOL> space = "<STR_LIT:U+0020>" <EOL> if sep is None : <EOL> sep = space <EOL> if end is None : <EOL> end = newline <EOL> for i , arg in enumerate ( args ) : <EOL> if i : <EOL> write ( sep ) <EOL> write ( arg ) <EOL> write ( end ) <EOL> _add_doc ( reraise , """<STR_LIT>""" ) <EOL> def with_metaclass ( meta , * bases ) : <EOL> """<STR_LIT>""" <EOL> return meta ( "<STR_LIT>" , bases , { } ) <EOL> def add_metaclass ( metaclass ) : <EOL> """<STR_LIT>""" <EOL> def wrapper ( cls ) : <EOL> orig_vars = cls . __dict__ . copy ( ) <EOL> orig_vars . pop ( '<STR_LIT>' , None ) <EOL> orig_vars . pop ( '<STR_LIT>' , None ) <EOL> for slots_var in orig_vars . get ( '<STR_LIT>' , ( ) ) : <EOL> orig_vars . pop ( slots_var ) <EOL> return metaclass ( cls . __name__ , cls . __bases__ , orig_vars ) <EOL> return wrapper <EOL> if PY3 : <EOL> _assertRaisesRegex = "<STR_LIT>" <EOL> else : <EOL> _assertRaisesRegex = "<STR_LIT>" <EOL> def assertRaisesRegex ( self , * args , ** kwargs ) : <EOL> return getattr ( self , _assertRaisesRegex ) ( * args , ** kwargs ) <EOL> add_move ( MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) ) <EOL> add_move ( MovedModule ( "<STR_LIT>" , "<STR_LIT>" ) ) </s>
