the from statement although we've already seen enough to handle module files in our programsthe next extends our coverage of the import model by presenting package imports-- way for our import statements to specify part of the directory path leading to the desired module as we'll seepackage imports give us hierarchy that is useful in larger systems and allow us to break conflicts between same-named modules before we move onthoughhere' quick quiz on the concepts presented here test your knowledgequiz how do you make module how is the from statement related to the import statement how is the reload function related to imports when must you use import instead of from name three potential pitfalls of the from statement what is the airspeed velocity of an unladen swallowtest your knowledgeanswers to create moduleyou simply write text file containing python statementsevery source code file is automatically moduleand there is no syntax for declaring one import operations load module files into module objects in memory you can also make module by writing code in an external language like or javabut such extension modules are beyond the scope of this book the from statement imports an entire modulelike the import statementbut as an extra step it also copies one or more variables from the imported module into the scope where the from appears this enables you to use the imported names directly (nameinstead of having to go through the module (module name by defaulta module is imported only once per process the reload function forces module to be imported again it is mostly used to pick up new versions of module' source code during developmentand in dynamic customization scenarios you must use import instead of from only when you need to access the same name in two different modulesbecause you'll have to specify the names of the enclosing modulesthe two names will be unique the as extension can render from usable in this context as well the from statement can obscure the meaning of variable (which module it is defined in)can have problems with the reload call (names may reference prior versions of objects)and can corrupt namespaces (it might silently overwrite names module coding basics