you have two ways to import modules each technique is used in specific circumstancesimportyou use the import statement when you want to import an entire module this is the most common method that developers use to import modules because it saves time and requires only one line of code howeverthis approach also uses more memory resources than does the approach of selectively importing the attributes you needwhich the next paragraph describes from importyou use the from import statement when you want to selectively import individual module attributes this method saves resourcesbut at the cost of complexity in additionif you try to use an attribute that you didn' importpython registers an error yesthe module still contains the attributebut python can' see it because you didn' import it now that you have better idea of how to import modulesit' time to look at them in detail the following sections help you work through importing modules using the two techniques available in python changing the current python directory the directory that python is using to access code affects which modules you can load the python library files are always included in the list of locations that python can accessbut python knows nothing of the directory you use to hold your source code unless you tell it to look there the easiest method for accomplish ing this task is to change the current python directory to point to your code folder using these steps open the python shell you see the python shell window appear type import os and press enter this action imports the python os library you need to import this library to change the directory (the location python sees on diskto the working directory for this book type os chdir(" :\bp \"and press enter you need to use the directory that contains the downloadable source or your own proj ect files on your local hard drive the book uses the default book directory described in python can now use the down loadable source code directory to access modules that you create for this