Skip to main content

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

Latest release 20250323: Provide direct r() and s() instead of circular cs.lex import.

Module contents:

  • debug(*a, **kw): Wrapper for debug() which does a deferred import.
  • error(*a, **kw): Wrapper for error() which does a deferred import.
  • exception(*a, **kw): Wrapper for exception() which does a deferred import.
  • info(*a, **kw): Wrapper for info() which does a deferred import.
  • log(*a, **kw): Wrapper for log() which does a deferred import.
  • 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.
  • r(obj): simplistic versions of cs.lex r() and s()
  • trace(*a, **kw): Wrapper for info() which does a deferred import.
  • warning(*a, **kw): Wrapper for warning() which does a deferred import.

Release Log

Release 20250323: Provide direct r() and s() instead of circular cs.lex import.

Release 20240316: Fixed release upload artifacts.

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.

Release files for cs-gimmicks 20250323

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-gimmicks 20250323
File Size Uploaded
cs_gimmicks-20250323.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cs-gimmicks 20250323
File Interpreter ABI Platform
cs_gimmicks-20250323-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 7.1 kB

Release files / cs_gimmicks-20250323.tar.gz

Download URL cs_gimmicks-20250323.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
502d313206e309ef3bb446e906611dbe8f53558696ca9d1dba07256b2ab44af9
BLAKE2b-256 checksum
How to use checksums
53e5d1ff9763379af0a2cd33dee39ae91cf3e46f3f216b0d38de6f75ef57b1eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / cs_gimmicks-20250323-py2.py3-none-any.whl

Download URL cs_gimmicks-20250323-py2.py3-none-any.whl
Size 3.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9cc38b656a5bbd7474e893725f69beb7cbc93a280c1375333f12ec38be3c99df
BLAKE2b-256 checksum
How to use checksums
a3cf1dbf0dedfece064e3e69d65642959ce35b70167127b442fcd50cd81cab5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

20250323 This release

2 release files

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