Skip to main content

Gimmicks and hacks to make some of my other modules more robust and less demanding of others.

Project description

Gimmicks and hacks to make some of my other modules more robust and less demanding of others.

Latest release 20230331: New open_append to handle idiotic Linux do-not-open-tty-for-append semantics.

Function debug(*a, **kw)

Wrapper for debug() which does a deferred import.

Function error(*a, **kw)

Wrapper for error() which does a deferred import.

Function exception(*a, **kw)

Wrapper for exception() which does a deferred import.

Function info(*a, **kw)

Wrapper for info() which does a deferred import.

Function log(*a, **kw)

Wrapper for log() which does a deferred import.

Function open_append(path)

Ghastly hack to open something for append entirely because some Linux systems do not let you open a character device for append. Tries sane 'a' and falls back through 'r+' and finally to 'w' only if path refers to a character device.

Function trace(*a, **kw)

Wrapper for info() which does a deferred import.

Function warning(*a, **kw)

Wrapper for warning() which does a deferred import.

Release Log

Release 20230331: New open_append to handle idiotic Linux do-not-open-tty-for-append semantics.

Release 20230212: Add gimmicks for cs.lex.r and cs.lex.s.

Release 20230210: DEVNULL default open for "r+b" instead of "wb".

Release 20221228: Generalise the logging function map, add trace function, bugfix logging call lookup.

Release 20220429: Add DEVNULL symbol, needed before Python 3.3.

Release 20211208: Define TimeoutError.

Release 20210306: Add simple implementations of nullcontext and SimpleNamespace.

Release 20200418.1: Initial release with logging call stubs.

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.gimmicks-20230331.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cs.gimmicks-20230331-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file cs.gimmicks-20230331.tar.gz.

File metadata

  • Download URL: cs.gimmicks-20230331.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for cs.gimmicks-20230331.tar.gz
Algorithm Hash digest
SHA256 83b23f9cf72da91320b602e2ae88947f3b1cc5145dc27d8db25842d147daef84
MD5 28ce14f7534c81c2d9c98b665a00574d
BLAKE2b-256 76374e56b8f3f888d85508c8492cbf9a57e32946cb6e50ed815deaed8b7c6272

See more details on using hashes here.

File details

Details for the file cs.gimmicks-20230331-py3-none-any.whl.

File metadata

  • Download URL: cs.gimmicks-20230331-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for cs.gimmicks-20230331-py3-none-any.whl
Algorithm Hash digest
SHA256 22444d4eb4b5b5447d36f06cde2efc6c827fe8f6606ef56fdb7d125146b9f56e
MD5 061c5a60d20db6d4ae5166177e24a0a0
BLAKE2b-256 fd8b8af16115bd9d8e7180096817726d57c579f9a7051626ef3d305e4527e01f

See more details on using hashes here.

Supported by

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