What platform (Win/Linux/Mac) are you running on? What terminal software are you using?
% python -m rich.diagnose
╭─────────────────────── <class 'rich.console.Console'> ───────────────────────╮
│ A high level console interface. │
│ │
│ ╭──────────────────────────────────────────────────────────────────────────╮ │
│ │ <console width=80 ColorSystem.STANDARD> │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ │
│ color_system = 'standard' │
│ encoding = 'utf-8' │
│ file = <_io.TextIOWrapper name='<stdout>' mode='w' │
│ encoding='utf-8'> │
│ height = 78 │
│ 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=78), │
│ legacy_windows=False, │
│ min_width=1, │
│ max_width=80, │
│ is_terminal=True, │
│ encoding='utf-8', │
│ max_height=78, │
│ 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=78) │
│ 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 ───────╮
│ { │
│ 'CLICOLOR': None, │
│ 'COLORTERM': None, │
│ 'COLUMNS': None, │
│ 'JPY_PARENT_PID': None, │
│ 'JUPYTER_COLUMNS': None, │
│ 'JUPYTER_LINES': None, │
│ 'LINES': None, │
│ 'NO_COLOR': None, │
│ 'TERM_PROGRAM': None, │
│ 'TERM': 'xterm', │
│ 'TTY_COMPATIBLE': None, │
│ 'TTY_INTERACTIVE': None, │
│ 'VSCODE_VERBOSE_LOGGING': None │
│ } │
╰────────────────────────────────────╯
platform="Linux"
% pip freeze | grep rich
rich @ file:///home/qha/github/rich
% pwd
/home/qha/github/rich
% git show --oneline
9d8f9a37 (HEAD -> main, origin/main, origin/HEAD, fork/main) Merge pull request #4175 from Textualize/fix-readme-master-to-main
Describe the bug
The Live class of Rich emits a newline on stopping but only if its console is connected to a terminal.
I use greenbone-feed-sync that is built with Rich and it makes the output captured by journald (when run as a service) hard to read.
I prepared a branch that fixes this: https://github.com/qha/rich/tree/fix-live-termination
Provide a minimal code example that demonstrates the issue if you can.
Please ensure that your example runs without modification (don't forget imports).
If the issue is visual in nature, consider posting a screenshot.
Note the lack of a newline between destination and Moving in the middle.
Platform
Click to expand
What platform (Win/Linux/Mac) are you running on? What terminal software are you using?
Linux, Xterm