From: = <=> Date: Wed, 1 Apr 2026 15:11:01 +0000 (+0200) Subject: Newlines X-Git-Url: https://git.uwuaxy.net/animations_scrolling.mp4?a=commitdiff_plain;h=7e10f093ead9f7fa243942c0d4b2bb26068bb821;p=axy%2Fft%2Fpython08.git Newlines --- diff --git a/ex00/construct.py b/ex00/construct.py index b737f6f..505de63 100644 --- a/ex00/construct.py +++ b/ex00/construct.py @@ -18,31 +18,38 @@ def get_venv_name() -> str | None: def print_status() -> None: """Print the current status of the Matrix (virtual environment).""" if is_venv(): + print() print("MATRIX STATUS: Welcome to the construct") + print() print(f"Current Python: {sys.executable}") print(f"Virtual Environment: {get_venv_name()}") print(f"Environment Path: {sys.prefix}") + print() print("SUCCESS: You're in an isolated environment!") print("Safe to install packages without affecting") print("the global system.") + print() print("Package installation path:") - # site.getsitepackages() might return multiple paths, - # usually we want the one in sys.prefix site_packages = site.getsitepackages() for path in site_packages: if path.startswith(sys.prefix): print(path) break else: + print() print("MATRIX STATUS: You're still plugged in") + print() print(f"Current Python: {sys.executable}") print("Virtual Environment: None detected") + print() print("WARNING: You're in the global environment!") print("The machines can see everything you install.") + print() print("To enter the construct, run:") print("python -m venv matrix_env") print("source matrix_env/bin/activate # On Unix") print("matrix_env\\Scripts\\activate # On Windows") + print() print("Then run this program again.")