(continued from previous pageaiffread py aiffwrite py auread py auwrite py effectssubpackage for sound effects __init__ py echo py surround py reverse py filterssubpackage for filters __init__ py equalizer py vocoder py karaoke py when importing the packagepython searches through the directories on sys path looking for the package subdirectory the __init__ py files are required to make python treat the directories as containing packagesthis is done to prevent directories with common namesuch as stringfrom unintentionally hiding valid modules that occur later on the module search path in the simplest case__init__ py can just be an empty filebut it can also execute initialization code for the package or set the __all__ variabledescribed later users of the package can import individual modules from the packagefor exampleimport sound effects echo this loads the submodule sound effects echo it must be referenced with its full name sound effects echo echofilter(inputoutputdelay= atten= an alternative way of importing the submodule isfrom sound effects import echo this also loads the submodule echoand makes it available without its package prefixso it can be used as followsecho echofilter(inputoutputdelay= atten= yet another variation is to import the desired function or variable directlyfrom sound effects echo import echofilter againthis loads the submodule echobut this makes its function echofilter(directly availableechofilter(inputoutputdelay= atten= note that when using from package import itemthe item can be either submodule (or subpackageof the packageor some other name defined in the packagelike functionclass or variable the import statement first tests whether the item is defined in the packageif notit assumes it is module and attempts to load it if it fails to find itan importerror exception is raised contrarilywhen using syntax like import item subitem subsubitemeach item except for the last must be packagethe last item can be module or package but can' be class or function or variable defined packages