Implementation & Configuration Flashcards
7 cards from real POC practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Implementation & Configuration flashcards as text
Which pip command installs a package in 'editable' (development) mode from a local directory?
Answer: pip install -e .
The `-e` flag (short for `--editable`) installs a package so changes in the source directory are immediately reflected without reinstalling.
What is the purpose of a `pyproject.toml` file in a Python project?
Answer: It defines build system requirements and project metadata per PEP 517/518
`pyproject.toml` is the modern standard (PEP 517/518) for specifying build backends, build dependencies, and project metadata.
Which Python built-in module provides support for reading and writing configuration files in INI format?
Answer: configparser
The `configparser` module reads and writes configuration files using INI-style syntax with sections and key-value pairs.
What does `sys.path.insert(0, '/my/module/path')` accomplish?
Answer: Prepends a directory so Python searches it first
Inserting at index 0 places the directory at the front of `sys.path`, giving it the highest search priority.
In a virtual environment created with `venv`, where are installed packages stored?
Answer: In the `Lib/site-packages` subdirectory of the venv folder
A venv maintains its own isolated `Lib/site-packages` directory separate from the global Python installation.
Which command generates a `requirements.txt` file listing all currently installed packages and their versions?
Answer: pip freeze > requirements.txt
`pip freeze` outputs installed packages in `name==version` format, suitable for use in `requirements.txt`.
What happens when you run `python -m module_name` instead of importing a module?
Answer: Python executes the module's `__main__` block as a script
The `-m` flag locates the named module and executes it as a script, triggering the `if __name__ == '__main__':` block.