]> Untitled Git - axy/ft/python08.git/commitdiff
Newlines
author= <=>
Wed, 1 Apr 2026 15:11:01 +0000 (17:11 +0200)
committer= <=>
Wed, 1 Apr 2026 15:11:01 +0000 (17:11 +0200)
ex00/construct.py

index b737f6f58a94cc7665a8eec63073f65a47784fc2..505de63796ab16058b555a621248df71a1e52113 100644 (file)
@@ -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.")