Skip to main content

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

Class Frame

MRO: Frame, builtins.tuple
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)

Recite current or supplied stack to fp, default sys.stderr.

Release files for cs-py-stack 20190101

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-py-stack 20190101
File Size Uploaded
cs.py.stack-20190101.tar.gz 2.1 kB Details

Release files / cs.py.stack-20190101.tar.gz

Download URL cs.py.stack-20190101.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
eb0ff0d305f6d3b9041ae38efca40fc75b99689a979de5e220db20a4f3502d54
BLAKE2b-256 checksum
How to use checksums
91d89833eac255e255cabdc2539cea23cdc6254ddbbbbcb8d0bbc3515e991227
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.6

Release history Release notifications | RSS feed

This release

20190101 This release

1 release file

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