We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
Rich doesn't restore the terminal back to its original settings when the program terminates:
wannes@Stefans-iMac ~ % python -c "import rich.console; rich.console.Console().show_cursor(False)"
Rich doesn't restore the terminal back to its original settings when the program is suspended:
from rich.console import Console console: Console = Console() console.show_cursor(show=False) input("Press enter") console.show_cursor()
Platform
╭─────────────────────── <class 'rich.console.Console'> ───────────────────────╮ │ A high level console interface. │ │ │ │ ╭──────────────────────────────────────────────────────────────────────────╮ │ │ │ <console width=80 ColorSystem.EIGHT_BIT> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ color_system = '256' │ │ encoding = 'utf-8' │ │ file = <_io.TextIOWrapper name='<stdout>' mode='w' │ │ encoding='utf-8'> │ │ height = 24 │ │ is_alt_screen = False │ │ is_dumb_terminal = False │ │ is_interactive = True │ │ is_jupyter = False │ │ is_terminal = True │ │ legacy_windows = False │ │ no_color = False │ │ options = ConsoleOptions( │ │ size=ConsoleDimensions(width=80, height=24), │ │ legacy_windows=False, │ │ min_width=1, │ │ max_width=80, │ │ is_terminal=True, │ │ encoding='utf-8', │ │ max_height=24, │ │ justify=None, │ │ overflow=None, │ │ no_wrap=False, │ │ highlight=None, │ │ markup=None, │ │ height=None │ │ ) │ │ quiet = False │ │ record = False │ │ safe_box = True │ │ size = ConsoleDimensions(width=80, height=24) │ │ soft_wrap = False │ │ stderr = False │ │ style = None │ │ tab_size = 8 │ │ width = 80 │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─── <class 'rich._windows.WindowsConsoleFeatures'> ────╮ │ Windows features available. │ │ │ │ ╭───────────────────────────────────────────────────╮ │ │ │ WindowsConsoleFeatures(vt=False, truecolor=False) │ │ │ ╰───────────────────────────────────────────────────╯ │ │ │ │ truecolor = False │ │ vt = False │ ╰───────────────────────────────────────────────────────╯ ╭──────── Environment Variables ────────╮ │ { │ │ 'TERM': 'xterm-256color', │ │ 'COLORTERM': None, │ │ 'CLICOLOR': None, │ │ 'NO_COLOR': None, │ │ 'TERM_PROGRAM': 'Apple_Terminal', │ │ 'COLUMNS': None, │ │ 'LINES': None, │ │ 'JUPYTER_COLUMNS': None, │ │ 'JUPYTER_LINES': None, │ │ 'JPY_PARENT_PID': None, │ │ 'VSCODE_VERBOSE_LOGGING': None │ │ } │ ╰───────────────────────────────────────╯ platform="Darwin" rich==13.7.1
The text was updated successfully, but these errors were encountered:
Thank you for your issue. Give us a little time to review it.
PS. You might want to check the FAQ if you haven't done so already.
This is an automated reply, generated by FAQtory
Sorry, something went wrong.
For reference, here's how I handled this in my own library: https://github.com/nineteendo/ansio/blob/125577e28362ed5395c3dafed38df763fa88b8c2/ansio/__init__.py
sys.stdout.write('hello\n')
No branches or pull requests
Describe the bug
On exit
Rich doesn't restore the terminal back to its original settings when the program terminates:
On suspend
Rich doesn't restore the terminal back to its original settings when the program is suspended:
Platform
Click to expand
The text was updated successfully, but these errors were encountered: