Skip to main content

Log by overwriting the previous output in the terminal

Project description

PyPI Supported Python Versions Build Status

Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc. (Port of sindresorhus/log-update from js to python)


Just pip install it, and you're good to go.

pip install logupdate


from logupdate import logupdate
from time import sleep

logupdate("Hello, a secret is about to be said to you")
logupdate("You can pimp your interactive commands with logupdate")
logupdate("Don't forget the secret ;)")


You can find some example in the dedicated examples folder.


  • logupdate(text, ...): log to stdout (overwriting previous input)

  • logupdate.clear([restore_cursor=None]): Clear previous logged output. This can also restore the cursor if asked.

  • logupdate.done([restore_cursor=None]): Persist the logged output. This enable to start a new "log session" below. This restores the cursor unless you ask not to.

  • logupdate.stderr(text, ...): log to stderr

  • logupdate.stderr.clear([restore_cursor=None]): clear stderr.

  • logupdate.stderr.done([restore_cursor=None]): persist stderr.

  • logupdate.create(stream, [show_cursor=False]) : return a logupdate method dedicated to log to given stream.


MIT © AdrieanKhisbe

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logupdate-0.3.1.tar.gz (4.2 kB view hashes)

Uploaded source

Built Distribution

logupdate-0.3.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page