mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-10 00:09:04 +00:00
19 lines
434 B
Python
19 lines
434 B
Python
"""Utility functions for terminal output."""
|
|
|
|
import sys
|
|
|
|
|
|
def clear_screen() -> None:
|
|
"""Clear the terminal screen using an ANSI escape code."""
|
|
print("\033c", end="")
|
|
|
|
|
|
def pause(message: str = "Press Enter to continue...") -> None:
|
|
"""Wait for the user to press Enter before proceeding."""
|
|
if not sys.stdin or not sys.stdin.isatty():
|
|
return
|
|
try:
|
|
input(message)
|
|
except EOFError:
|
|
pass
|