for examplean import statement of the form import might today load or resolve toa source code file named py byte code file named pyc an optimized byte code file named pyo ( less common formata directory named bfor package imports (described in compiled extension modulecoded in cc++or another languageand dynamically linked when imported ( so on linuxor dll or pyd on cygwin and windowsa compiled built-in module coded in and statically linked into python zip file component that is automatically extracted when imported an in-memory imagefor frozen executables java classin the jython version of python net componentin the ironpython version of python extensionsjythonand package imports all extend imports beyond simple files to importersthoughdifferences in the loaded file type are completely irrelevantboth when importing and when fetching module attributes saying import gets whatever module isaccording to your module search pathand attr fetches an item in the modulebe it python variable or linked-in function some standard modules we will use in this book are actually coded in cnot pythonbecause they look just like python-coded module filestheir clients don' have to care selection priorities if you have both py and so in different directoriespython will always load the one found in the first (leftmostdirectory of your module search path during the leftto-right search of sys path but what happens if it finds both py and so in the same directoryin this casepython follows standard picking orderthough this order is not guaranteed to stay the same over time or across implementations in generalyou should not depend on which type of file python will choose within given directory-make your module names distinctor configure your module search path to make your module selection preferences explicit import hooks and zip files normallyimports work as described in this section--they find and load files on your machine howeverit is possible to redefine much of what an import operation does in pythonusing what are known as import hooks these hooks can be used to make imports do various useful thingssuch as loading files from archivesperforming decryptionand so on the module search path