<s> sources = """<STR_LIT>""" <EOL> import sys <EOL> import base64 <EOL> import zlib <EOL> class DictImporter ( object ) : <EOL> def __init__ ( self , sources ) : <EOL> self . sources = sources <EOL> def find_module ( self , fullname , path = None ) : <EOL> if fullname == "<STR_LIT>" and sys . version_info >= ( <NUM_LIT:2> , <NUM_LIT:7> ) : <EOL> return None <EOL> if fullname in self . sources : <EOL> return self <EOL> if fullname + '<STR_LIT>' in self . sources : <EOL> return self <EOL> return None <EOL> def load_module ( self , fullname ) : <EOL> from types import ModuleType <EOL> try : <EOL> s = self . sources [ fullname ] <EOL> is_pkg = False <EOL> except KeyError : <EOL> s = self . sources [ fullname + '<STR_LIT>' ] <EOL> is_pkg = True <EOL> co = compile ( s , fullname , '<STR_LIT>' ) <EOL> module = sys . modules . setdefault ( fullname , ModuleType ( fullname ) ) <EOL> module . __file__ = "<STR_LIT>" % ( __file__ , fullname ) <EOL> module . __loader__ = self <EOL> if is_pkg : <EOL> module . __path__ = [ fullname ] <EOL> do_exec ( co , module . __dict__ ) <EOL> return sys . modules [ fullname ] <EOL> def get_source ( self , name ) : <EOL> res = self . sources . get ( name ) <EOL> if res is None : <EOL> res = self . sources . get ( name + '<STR_LIT>' ) <EOL> return res <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> try : <EOL> import pkg_resources <EOL> except ImportError : <EOL> sys . stderr . write ( "<STR_LIT>" ) <EOL> sys . exit ( <NUM_LIT:2> ) <EOL> if sys . version_info >= ( <NUM_LIT:3> , <NUM_LIT:0> ) : <EOL> exec ( "<STR_LIT>" ) <EOL> import pickle <EOL> sources = sources . encode ( "<STR_LIT:ascii>" ) <EOL> sources = pickle . loads ( zlib . decompress ( base64 . decodebytes ( sources ) ) ) <EOL> else : <EOL> import cPickle as pickle <EOL> exec ( "<STR_LIT>" ) <EOL> sources = pickle . loads ( zlib . decompress ( base64 . decodestring ( sources ) ) ) <EOL> importer = DictImporter ( sources ) <EOL> sys . meta_path . insert ( <NUM_LIT:0> , importer ) <EOL> entry = "<STR_LIT>" <EOL> do_exec ( entry , locals ( ) ) </s>
