Skip to main content

Single line status updates with minimal update sequences.

Latest release 20200517:

  • Multiline support!
  • Multiline support!
  • Multiline support!
  • New UpdProxy class to track a status line of a multiline Upd in the face of further inserts and deletes.
  • Upd(...) now returns a context manager to clean up the display on its exit.
  • Upd(...) is now a SingletonMixin in order to use the same state if set up in multiple places.

This is available as an output mode in cs.logutils.

Example:

with Upd() as U:
    for filename in filenames:
        U.out(filename)
        ... process filename ...
        upd.nl('an informational line')

Function cleanupAtExit()

Cleanup function called at programme exit to clear the status line.

Class Upd(cs.obj.SingletonMixin)

A SingletonMixin subclass for maintaining a regularly updated status line.

Class UpdProxy

A proxy for a status line of a multiline Upd.

This provides a stable reference to a status line after it has been instantiated by Upd.insert.

The status line can be accessed and set via the .text property.

Release Log

Release 20200517:

  • Multiline support!
  • Multiline support!
  • Multiline support!
  • New UpdProxy class to track a status line of a multiline Upd in the face of further inserts and deletes.
  • Upd(...) now returns a context manager to clean up the display on its exit.
  • Upd(...) is now a SingletonMixin in order to use the same state if set up in multiple places.

Release 20200229:

  • Upd: can now be used as a context manager, clearing the line on exit.
  • Upd.without is now a context manager, returning the older state, and accepting an optional inner state (default "").
  • Upd is now a singleton factory, obsoleting upd_for.
  • Upd.nl: use "insert line above" mode if supported.

Release 20181108: Documentation improvements.

Release 20170903:

  • New function upd_for(stream) returning singleton Upds.
  • Drop noStrip keyword argument/mode - always strip trailing whitespace.

Release 20160828:

  • Use "install_requires" instead of "requires" in DISTINFO.
  • Add Upd.flush method.
  • Upd.out: fix longstanding trailing text erasure bug.
  • Upd.nl,out: accept optional positional parameters, use with %-formatting if supplied, just like logging.

Release 20150118: metadata fix

Release 20150116: Initial PyPI release.

Release files for cs-upd 20200517

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs-upd 20200517
File Size Uploaded
cs.upd-20200517.tar.gz 7.2 kB Details

Release files / cs.upd-20200517.tar.gz

Download URL cs.upd-20200517.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a702c100c5dd437bfb99db1463c0bafacac4d1f2aa83e4d67c5b5e9431be4cca
BLAKE2b-256 checksum
How to use checksums
8b3e9dbfe4406a335a9e2d414e8a65d3972cafdce71aeae232493014b6f2b34c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

20200517 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page