Release 20190812: stack_dump(): trim the last 2 frames from the listing by default (they are part of stack_dump's implementation).
I find the supplied python traceback facilities quite awkward. These functions provide convenient facilities.
Function caller(frame_index=-3)
Return the Frame of the caller's caller.
Useful frame_index values:
-1: caller, this function-2: invoker, who wants to know the caller-3: the calling function of the invoker
The default from_index value is -3.
Class Frame
MRO: Frame, builtins.tuple
A namedtuple for stack frame contents.
Function frames()
Return the current stack as a list of Frame objects.
Function stack_dump(fp=None, indent=0, Fs=None, skip=None)
Recite current or supplied stack to fp, default sys.stderr.
Parameters:
fp: the output file object, defaultsys.stderrindent: how many spaces to indent the stack lines, default0Fs: the stackFrames to write, default obtained from the current stackskip: the number ofFrames to trim from the end ofFs; ifFsisNonethis defaults to2to trim theFrames for thestack_dumpfunction and its call toframes(), otherwise the default is0to use the suppliedFrames as is
Release Log
Release 20190812: stack_dump(): trim the last 2 frames from the listing by default (they are part of stack_dump's implementation).
Release 20190101: _Frame: rename .functionname to .funcname; caller: turn raw frames into Frames. caller(): accept optional frame_index, default -3.
Release 20160827: Add stack_dump().
Release 20150115: PyPI metadata fixups.
Release 20150111: Tag for initial PyPI release of cs.py.stack.
Metadata
Release files for cs-py-stack 20190812
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cs.py.stack-20190812.tar.gz | 2.9 kB | Without provenance | Details for cs.py.stack-20190812.tar.gz |
Release files / cs.py.stack-20190812.tar.gz
| Download URL | cs.py.stack-20190812.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2a2c73db723233763054fba9edbc546686077b93edd89488c1bb586d85a779c
|
|
BLAKE2b-256 checksum How to use checksums |
47403a08b0b0d5853a9b16320aab71fef739485856910c479178b6dd511ed30e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4
|
Security for cs-py-stack 20190812
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.