From 38212d29b4dc9b6fc345b182c4393513bc4a7dda Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Thu, 15 Jun 2023 17:42:03 +0300 Subject: [PATCH] print with flush replace sys --- src/fw_radios.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fw_radios.py b/src/fw_radios.py index d44fd82..7dda1df 100644 --- a/src/fw_radios.py +++ b/src/fw_radios.py @@ -9,7 +9,6 @@ from loguru import logger from shlex import quote import threading import time -import sys fzf = FzfPrompt() @@ -94,8 +93,7 @@ def radio_generator(radio_session_id): player.playlist_current_pos if playlist_remaining <= 2: radio_get_track(radio_session_id) - sys.stdout.write('\rRadio generator stopped') - sys.stdout.flush() + print('\rRadio generator stopped', flush=True) radio_event_gen = threading.Event()