Please enable JavaScript.
Coggle requires JavaScript to display documents.
Python3 (Serious Python) (Chapter 2: Modules, Libraries, And Frameworks (…
Python3 (Serious Python)
Chapter 2: Modules, Libraries, And Frameworks
-
PATH order:
The order of the paths in sys.path is important. It’s useful to put the path most likely to contain the modules you are importing early in the list to speed up search time
-
Python shadow import
Your cur- rent directory is searched before the Python Standard Library directory. That means that if you decide to name one of your scripts random.py
and then try using import random, the file from your current directory will be imported rather than the Python module.
You can easily write a package importer and a loader by checking the directory path contains __init__.py
file
-
-
-
-
-
-
-
-