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 @@
## 2025-03-02 - [CLI Progress Updates]
**Learning:** Terminal output can become cluttered when iterating through multiple loading steps, reducing the clarity of the overall output stream. Using a simple carriage return (`\r`) with `flush=True` creates clean, in-place progress bars that update the same line instead of spamming standard out.
**Action:** When printing loading bars or single-line progress sequences in command-line tools, default to `\r` and ensure the output stream is flushed.
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"\r{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}")


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