notice in the preceding example that the package modules still have access to standard library modules like string--their normal imports are still relative to the entries on the module search path in factif you add string module to the cwd againimports in package will find it there instead of in the standard library although you can skip the package directory with an absolute import in xyou still can' skip the home directory of the program that imports the packagecode\string py print('string code\pkg\spam py from import eggs print(eggs xcode\pkg\eggs py import string print(string<=gets string in cwdnot python libc:\codec:\python \python same result in import pkg spam stringstringstringstringstringstringstringstring selecting modules with relative and absolute imports to show how this applies to imports of standard library modulesreset the package again get rid of the local string moduleand define new one inside the package itselfc:\codedel stringdel __pycache__\stringfor bytecode in code\pkg\spam py import string print(string<=relative in xabsolute in code\pkg\string py print('ni nowwhich version of the string module you get depends on which python you use as before interprets the import in the first file as absolute and skips the packagebut does not--another example of the incompatible behavior in xc:\codec:\python \python import pkg spam :\codec:\python \python import pkg spam nininininininini module packages