import datetime
import logging
import time
from tqdm_loggable.auto import tqdm
from tqdm_loggable.tqdm_logging import tqdm_logging
logging.basicConfig(
level=logging.INFO
)
tqdm_logging.set_log_rate(datetime.timedelta(seconds=2))
for i in tqdm(range(11)):
time.sleep(0.5)
for i in tqdm(range(11)):
time.sleep(0.5)
The actual output is:
INFO:tqdm_loggable.tqdm_logging:Progress on: -/11 rate:- remaining:? elapsed:00:00 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 4.00it/11.0it rate:2.0it/s remaining:00:03 elapsed:00:02 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 8.00it/11.0it rate:2.0it/s remaining:00:01 elapsed:00:04 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 11.0it/11.0it rate:- remaining:? elapsed:00:05 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: -/11 rate:- remaining:? elapsed:00:00 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 4.00it/11.0it rate:2.0it/s remaining:00:03 elapsed:00:02 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 8.00it/11.0it rate:2.0it/s remaining:00:01 elapsed:00:04 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 11.0it/11.0it rate:- remaining:? elapsed:00:05 postfix:-
My expected output is without the extra newline:
INFO:tqdm_loggable.tqdm_logging:Progress on: -/11 rate:- remaining:? elapsed:00:00 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 4.00it/11.0it rate:2.0it/s remaining:00:03 elapsed:00:02 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 8.00it/11.0it rate:2.0it/s remaining:00:01 elapsed:00:04 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 11.0it/11.0it rate:- remaining:? elapsed:00:05 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: -/11 rate:- remaining:? elapsed:00:00 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 4.00it/11.0it rate:2.0it/s remaining:00:03 elapsed:00:02 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 8.00it/11.0it rate:2.0it/s remaining:00:01 elapsed:00:04 postfix:-
INFO:tqdm_loggable.tqdm_logging:Progress on: 11.0it/11.0it rate:- remaining:? elapsed:00:05 postfix:-
If I run this script:
The actual output is:
My expected output is without the extra newline: