You are here: Home / LBN / Up2date / Core Linux / BastionLinux 36 / python3-executing-2.0.1-1.lbn36.noarch

python3-executing-2.0.1-1.lbn36.noarch

Package Attributes
RPM  python3-executing-2.0.1-1.lbn36.noarch.rpm Architecture  noarch Size  197521 Created  2024/07/01 13:32:06 UTC
Package Specification
Summary Get the currently executing AST node of a frame, and other information
Group Application/Internet
License ZPL
Home Page https://pypi.org/project/executing
Description

executing

This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed.

Usage

Getting the AST node Getting the source code of the node Getting the __qualname__ of the current function The Source class

Installation How does it work? Is it reliable? Which nodes can it identify? Libraries that use this

Usage Getting the AST node import executing

node = executing.Source.executing(frame).node

Then node will be an AST node (from the ast standard library module) or None if the node couldn't be identified (which may happen often and should always be checked). node will always be the same instance for multiple calls with frames at the same point of execution. If you have a traceback object, pass it directly to Source.executing() rather than the tb_frame attribute to get the correct node. Getting the source code of the node For this you will need to separately install the asttokens library, then obtain an ASTTokens object: e

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PayloadIsZstd)  
rpmlib(CompressedFileNames)  
rpmlib(PartialHardlinkSets)  
rpmlib(FileDigests)  
Provides
python-executing
python3-executing
python3.10-executing
python3.10dist(executing)
python3dist(executing)
Obsoletes
python-executing

Document Actions