diff --git a/your-first-python-program.html b/your-first-python-program.html index 5059051..a3e528d 100755 --- a/your-first-python-program.html +++ b/your-first-python-program.html @@ -184,7 +184,7 @@ SyntaxError: non-keyword arg after keyword arg
sys module makes all of its functions and attributes available.
sys.path is a list of directory names that constitute the current search path. (Yours will look different, depending on your operating system, what version of Python you’re running, and where it was originally installed.) Python will look through these directories (in this order) for a .py file whose name matches what you’re trying to import.
-.py files. Some, like the sys module, are built-in modules; they are actually baked right into Python itself. Built-in modules behave just like regular modules, but their Python source code is not available, because they are not written in Python! (The sys module is written in C.)
+.py files. Some are built-in modules; they are actually baked right into Python itself. Built-in modules behave just like regular modules, but their Python source code is not available, because they are not written in Python! (Like Python itself, these built-in modules are written in C.)
sys.path, and then Python will look in that directory as well, whenever you try to import a module. The effect lasts as long as Python is running.
sys.path.insert(0, new_path), you inserted a new directory as the first item of the sys.path list, and therefore at the beginning of Python’s search path. This is almost always what you want. In case of naming conflicts (for example, if Python ships with version 2 of a particular library but you want to use version 3), this ensures that your modules will be found and used instead of the modules that came with Python.