Update page 'Day 9 homework - Sloetjes'
@@ -79,7 +79,8 @@ print(login)
|
||||
|
||||
* Therefore, the expression `__import__('os').getlogin()` is equivalent to `os.getlogin()`, but it dynamically imports the `os` module at runtime instead of using a regular import statement.
|
||||
|
||||
**9. Using the functions you created above and `sys.modules`, create a module designed to be run from the command line (`python -m myscript.py`) that generates a report summarizing the module environment, and break down the percentages of bytecode modules, DSO modules (these have `file` end in `.so` or `.dll`), and normal python code. **
|
||||
**9. Using the functions you created above and `sys.modules`, create a module designed to be run from the command line (`python -m myscript.py`) that generates a report summarizing the module environment, and break down the percentages of bytecode modules, DSO modules (these have `file` end in `.so` or `.dll`), and normal python code.**
|
||||
|
||||
```
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
Reference in New Issue
Block a user