Gimmicks and hacks to make some of my other modules more robust and less demanding of others.
Latest release 20260311: Upgrade the import of Buffer for more recent Python changes.
Short summary:
open_append: 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 ifpathrefers to a character device.
Module contents:
debug(*a, **kw): Wrapper fordebug()which does a deferred import.error(*a, **kw): Wrapper forerror()which does a deferred import.exception(*a, **kw): Wrapper forexception()which does a deferred import.info(*a, **kw): Wrapper forinfo()which does a deferred import.log(*a, **kw): Wrapper forlog()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 ifpathrefers to a character device.r(obj): simplistic versions of cs.lex r() and s()trace(*a, **kw): Wrapper forinfo()which does a deferred import.warning(*a, **kw): Wrapper forwarning()which does a deferred import.
Release Log
Release 20260311: Upgrade the import of Buffer for more recent Python changes.
Release 20250428: Define Buffer from collections.abc.Buffer, or from typing.ByteString for older Pythons.
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 20260311
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cs_gimmicks-20260311.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cs_gimmicks-20260311-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / cs_gimmicks-20260311.tar.gz
| Download URL | cs_gimmicks-20260311.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d78bfca9cf2037a345f435cded86df639305e0f4fe87e299a0e562eeffcb043a
|
|
BLAKE2b-256 checksum How to use checksums |
822c0db43619a63bac28457e8b75290d9e2ee5f3b7c3dabbc5970f9149f9b8cf
|
| 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-20260311-py2.py3-none-any.whl
| Download URL | cs_gimmicks-20260311-py2.py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3d1f607483fc6e7e9249b3e22b7d40509b0b2227372a113332c6cf39ecf6baf2
|
|
BLAKE2b-256 checksum How to use checksums |
4e80d0e23484808c7284f17da1c896a4293acf9df5c9ea15a55402f1e5efcfe7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|