Skip to main content

X(), for low level debugging

Project description

X() is my function for low level ad hoc debug messages. It takes a message and optional format arguments for use with %. It is presented here in its own module for reuse.

It normally writes directly to sys.stderr but accepts an optional keyword argument file to specify a different filelike object.

Its behaviour may be tweaked with the globals X_logger or X_via_tty. If file is not None, write to it unconditionally. Otherwise, if X_logger then log a warning to that logger. Otherwise, if X_via_tty then open /dev/tty and write the message to it. Otherwise, write the message to sys.stderr.

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

cs.x-20170902.tar.gz (2.2 kB view hashes)

Uploaded Source

Supported by

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