diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 00000000..57b26389 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2026-03-03 - [Inline CLI Progress indicators] +**Learning:** When implementing command-line loading states or progress indicators, printing multiple newlines causes terminal clutter. Using print with end="" and flush=True along with carriage returns (\r) allows updating the same line, resulting in a cleaner and more professional user experience. +**Action:** Default to using carriage returns (\r) for CLI loading bars and dynamic progress messages instead of new print statements. diff --git a/__pycache__/levhi_mahfuz.cpython-312.pyc b/__pycache__/levhi_mahfuz.cpython-312.pyc deleted file mode 100644 index c47e37e5..00000000 Binary files a/__pycache__/levhi_mahfuz.cpython-312.pyc and /dev/null differ diff --git a/__pycache__/test_11_dimensional_constants.cpython-312.pyc b/__pycache__/test_11_dimensional_constants.cpython-312.pyc new file mode 100644 index 00000000..9b3cb295 Binary files /dev/null and b/__pycache__/test_11_dimensional_constants.cpython-312.pyc differ diff --git a/__pycache__/test_grok_verification.cpython-312.pyc b/__pycache__/test_grok_verification.cpython-312.pyc new file mode 100644 index 00000000..2ff3fb95 Binary files /dev/null and b/__pycache__/test_grok_verification.cpython-312.pyc differ diff --git a/__pycache__/test_population_discrepancy.cpython-312.pyc b/__pycache__/test_population_discrepancy.cpython-312.pyc new file mode 100644 index 00000000..49ab6328 Binary files /dev/null and b/__pycache__/test_population_discrepancy.cpython-312.pyc differ diff --git a/simulasyon_11.py b/simulasyon_11.py index 4e07b8b1..db18535f 100644 --- a/simulasyon_11.py +++ b/simulasyon_11.py @@ -35,9 +35,9 @@ class Colors: # ============================================================================== def loading_bar(desc): - print(f"{Colors.CYAN}{desc}...{Colors.ENDC}") + print(f"{Colors.CYAN}{desc}...{Colors.ENDC}", end="", flush=True) time.sleep(0.01) - print(f"{Colors.GREEN}[OK]{Colors.ENDC}") + print(f"\r{Colors.CYAN}{desc}... {Colors.GREEN}[OK]{Colors.ENDC}", flush=True) # ------------------------------------------------------------------------------