<s> def __boot ( ) : <EOL> import sys <EOL> import os <EOL> PYTHONPATH = os . environ . get ( '<STR_LIT>' ) <EOL> if PYTHONPATH is None or ( sys . platform == '<STR_LIT:win32>' and not PYTHONPATH ) : <EOL> PYTHONPATH = [ ] <EOL> else : <EOL> PYTHONPATH = PYTHONPATH . split ( os . pathsep ) <EOL> pic = getattr ( sys , '<STR_LIT>' , { } ) <EOL> stdpath = sys . path [ len ( PYTHONPATH ) : ] <EOL> mydir = os . path . dirname ( __file__ ) <EOL> for item in stdpath : <EOL> if item == mydir or not item : <EOL> continue <EOL> importer = pic . get ( item ) <EOL> if importer is not None : <EOL> loader = importer . find_module ( '<STR_LIT>' ) <EOL> if loader is not None : <EOL> loader . load_module ( '<STR_LIT>' ) <EOL> break <EOL> else : <EOL> try : <EOL> import imp <EOL> stream , path , descr = imp . find_module ( '<STR_LIT>' , [ item ] ) <EOL> except ImportError : <EOL> continue <EOL> if stream is None : <EOL> continue <EOL> try : <EOL> imp . load_module ( '<STR_LIT>' , stream , path , descr ) <EOL> finally : <EOL> stream . close ( ) <EOL> break <EOL> else : <EOL> raise ImportError ( "<STR_LIT>" ) <EOL> known_paths = dict ( [ ( makepath ( item ) [ <NUM_LIT:1> ] , <NUM_LIT:1> ) for item in sys . path ] ) <EOL> oldpos = getattr ( sys , '<STR_LIT>' , <NUM_LIT:0> ) <EOL> sys . __egginsert = <NUM_LIT:0> <EOL> for item in PYTHONPATH : <EOL> addsitedir ( item ) <EOL> sys . __egginsert += oldpos <EOL> d , nd = makepath ( stdpath [ <NUM_LIT:0> ] ) <EOL> insert_at = None <EOL> new_path = [ ] <EOL> for item in sys . path : <EOL> p , np = makepath ( item ) <EOL> if np == nd and insert_at is None : <EOL> insert_at = len ( new_path ) <EOL> if np in known_paths or insert_at is None : <EOL> new_path . append ( item ) <EOL> else : <EOL> new_path . insert ( insert_at , item ) <EOL> insert_at += <NUM_LIT:1> <EOL> sys . path [ : ] = new_path <EOL> if __name__ == '<STR_LIT>' : <EOL> __boot ( ) <EOL> del __boot </s>
