Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -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.
Binary file removed __pycache__/levhi_mahfuz.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions simulasyon_11.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


# ------------------------------------------------------------------------------
Expand Down