โ† All POC Flashcard Decks

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
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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`.

  7. 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.