Update page 'Day 10 homework - Sloetjes '

xuanyi.wang
2023-04-19 19:57:07 +02:00
parent 886e431b10
commit 8c1f4a44b4
+3 -2
@@ -120,7 +120,7 @@ Module directory histogram:
* When a Python module contains compiled extensions, Python uses a different type of loader called an "extension loader" to load the module. Extension loaders are responsible for loading compiled binary code that is specific to the operating system and architecture of the system running Python. * When a Python module contains compiled extensions, Python uses a different type of loader called an "extension loader" to load the module. Extension loaders are responsible for loading compiled binary code that is specific to the operating system and architecture of the system running Python.
* In the case of Pandas, many of the sub-modules and sub-packages are implemented using compiled extensions, and therefore they are loaded using an extension loader rather than the `SourceFileLoader`. This is why we see a mix of different types of loaders in the `loader` column when we run the module-inspector script on a system that has Pandas installed. * In the case of Pandas, many of the sub-modules and sub-packages are implemented using compiled extensions, and therefore they are loaded using an extension loader rather than the `SourceFileLoader`. This is why we see a mix of different types of loaders in the `loader` column when we run the module-inspector script on a system that has Pandas installed.
**Extra credit: use the freeze utility to turn the module-inspector script into a real app.** **6. Extra credit: use the freeze utility to turn the module-inspector script into a real app.**
> * Install `cx_Freeze` using `pip`: pip install cx_Freeze > * Install `cx_Freeze` using `pip`: pip install cx_Freeze
> * Create a new file named `setup.py` in the same directory as `module-inspector.py`: > * Create a new file named `setup.py` in the same directory as `module-inspector.py`:
@@ -147,4 +147,5 @@ setup(
executables=[Executable("module-inspector.py", base=base)] executables=[Executable("module-inspector.py", base=base)]
) )
``` ```
> * Run the following command to create the executable: python setup.py build
> * Navigate to the build directory, and run the module-inspector executable to launch the app: ./module-inspector.py