from zip archivesarchived files are automatically extracted at import time when zip file is selected from the module import search path one of the standard library directories in the earlier sys path displayfor exampleis zip file today for more detailssee the python standard library manual' description of the built-in __import__ functionthe customizable tool that import statements actually run also see python ' "what' new?document for updates on this front that we'll mostly omit here for space in shortin this version and laterthe __import__ function is now implemented by impor tlib __import__in part to unify and more clearly expose its implementation the latter of these calls is also wrapped by importlib import_module- tool thatper python' current manualsis generally preferred over __import__ for direct calls to import by name stringa technique discussed in both calls still work todaythough the __import__ function supports customizing imports by replacement in the built-in scope (see )and other techniques support similar roles see the python library manuals for more details optimized byte code files finallypython also supports the notion of pyo optimized byte code filescreated and run with the - python command-line flagand automatically generated by some install tools because these run only slightly faster than normal pyc files (typically percent faster)howeverthey are infrequently used the pypy system (see and )for exampleprovides more substantial speedups see appendix and for more on pyo files third-party softwaredistutils this description of module search path settings is targeted mainly at userdefined source code that you write on your own third-party extensions for python typically use the distutils tools in the standard library to automatically install themselvesso no path configuration is required to use their code systems that use distutils generally come with setup py scriptwhich is run to install themthis script imports and uses distutils modules to place such systems in directory that is automatically part of the module search path (usually in the lib\site-packages subdirectory of the python install treewherever that resides on the target machinefor more details on distributing and installing with distutilssee the python standard manual setits use is beyond the scope of this book (for instanceit also provides ways to automatically compile -coded extensions on the target machinealso check out the third-party open source eggs systemwhich adds dependency checking for installed python software modulesthe big picture