from the pathalsoremember that such sys path settings endure for only as long as the python session or program (technicallyprocessthat made them runsthey are not retained after python exits by contrastpythonpath and pth file path configurations live in the operating system instead of running python programand so are more globalthey are picked up by every program on your machine and live on after program completes on some systemsthe former can be per-user and the latter can be installation-wide the as extension for import and from both the import and from statements were eventually extended to allow an imported name to be given different name in your script we've used this extension earlierbut here are some additional detailsthe following import statementimport modulename as name and use namenot modulename is equivalent to the followingwhich renames the module in the importer' scope only (it' still known by its original name to other files)import modulename name modulename del modulename don' keep original name after such an importyou can--and in fact must--use the name listed after the as to refer to the module this works in from statementtooto assign name imported from file to different name in the importer' scopeas before you get only the new name you providenot its originalfrom modulename import attrname as name and use namenot attrname as discussed in this extension is commonly used to provide short synonyms for longer namesand to avoid name clashes when you are already using name in your script that would otherwise be overwritten by normal import statementimport reallylongmodulename as name name func(use shorter nickname from module import utility as util from module import utility as util util ()util (can have only "utilityit also comes in handy for providing shortsimple name for an entire directory path and avoiding name collisions when using the package import feature described in import dir dir mod as mod mod func(only list full path once from dir dir mod import func as modfunc modfunc(rename to make unique if needed advanced module topics