that is all that is requiredalthough we are free to put any other code we like in the __init__ py file now we can write different kind of import statementfrom graphics import image xpm load("sleepy xpm"the from package import syntax directly imports all the modules named in the __all__ list soafter this importnot only is the xpm module directly accessiblebut so are all the others as noted earlierthis syntax can also be applied to modulethat isfrom module import *in which case all the functionsvariablesand other objects defined in the module (apart from those whose names begin with leading underscorewill be imported if we want to control exactly what is imported when the from module import syntax is usedwe can define an __all__ list in the module itselfin which case doing from module import will import only those objects named in the __all__ list so far we have shown only one level of nestingbut python allows us to nest packages as deeply as we like so we could have subdirectory inside the graphics directorysayvectorwith module files inside thatsuch as eps py and svg pygraphics__init__ py bmp py jpeg py png py tiff py vector__init__ py eps py svg py xpm py for the vector directory to be package it must have an __init__ py fileand as notedthis can be empty or could have an __all__ list as convenience for programmers who want to import using from graphics vector import to access nested package we just build on the syntax we have already usedimport graphics vector eps image graphics vector eps load("sneezy eps"the fully qualified name is rather longso some programmers try to keep their module hierarchies fairly flat to avoid this