now that you've learned about package-relative importsyou should also keep in mind that they may not always be your best option absolute package importswith complete directory path relative to directory on sys pathare still sometimes preferred over both implicit package-relative imports in python xand explicit package-relative import dot syntax in both python and this issue may seem obscurebut will likely become important fairly soon after you start coding packages of your own as we've seenpython ' relative import syntax and absolute search rule default make intrapackage imports explicit and thus easier to notice and maintainand allow explicit choice in some name conflict scenarios howeverthere are also two major ramifications of this model that you should be aware ofin both python and xuse of package-relative import statements implicitly binds file to package directory and roleand precludes it from being used in other ways in python xthe new relative search rule change means that file can no longer serve as both script and package module as easily as it could in these constraint' causes are bit subtlebut because the following are simultaneously truepython and do not allow from relative syntax to be used unless the importer is being used as part of package ( is being imported from somewhere elsepython does not search package module' own directory for importsunless from relative syntax is used (or the module is in the current working directory or main script' home directoryuse of relative imports prevents you from creating directories that serve as both executable programs and externally importable packages in and moreoversome files can no longer serve as both script and package module in as they could in in terms of import statementsthe rules pan out as follows--the first is for package mode only in both pythonsand the second is for program mode only in xfrom import mod import mod not allowed in nonpackage mode in both and does not search file' own directory in package mode in the net effect is that for files to be used in either or xyou may need to choose single usage mode--package (with relative importsor program (with simple imports)and isolate true package module files in subdirectory apart from top-level script files alternativelyyou can attempt manual sys path changes ( generally brittle and errorprone task)or always use full package paths in absolute imports instead of either package-relative syntax or simple importsand assume the package root is on the module search pathfrom system section mypkg import mod works in both program and package mode package relative imports