semvec/pypi-packages huggingface dataset:
atrace 0.8.0
Generate trace tables for simple programs
Requires Python: >=3.10

# Atrace

![build status](https://github.com/nwolff/atrace/actions/workflows/test.yml/badge.svg)

Automatically prints a trace table of **simple programs**

This module is intended for beginner programmers.

## Usage

Just import the module:

```
import atrace  # noqa

x, y = 1, 3
...
```

For instance running test/programs/small_example.py will print this table at the end:

```
╭────────┬─────┬─────┬────────┬─────────────┬───────────────────┬──────────────╮
│   line │   x │   y │ t      │ (greet) n   │ (greet) message   │ output       │
├────────┼─────┼─────┼────────┼─────────────┼───────────────────┼──────────────┤
│      3 │   1 │   3 │        │             │                   │              │
│      6 │   2 │     │        │             │                   │              │
│      6 │   3 │     │        │             │                   │              │
│      8 │     │     │        │             │                   │ x: 3         │
│     10 │     │     │ (1, 2) │             │                   │              │
│     13 │     │     │        │ bob         │                   │              │
│     14 │     │     │        │             │ bonjour bob!      │              │
│     18 │     │     │        │             │                   │ bonjour bob! │
╰────────┴─────┴─────┴────────┴─────────────┴───────────────────┴──────────────╯
```

## Compatibility

Requires python version 3.10 or higher.

Tested with:

- cpython
- pypy
- Thonny

## Does not work well with

- Multithreaded programs
- Multi-module programs
- Debuggers
- Classes
- Variables containing functions
- Context managers
- Generators
pl-run-program 0.0.22
A simple interface for running non-python programs in python.
Requires Python: >=3.14

# pl-run-program

A simple interface for running non-python programs in python.

## Project Status

Alpha. Expect breaking changes.

## Installation

```
uv add pl-run-program
```

## Usage

```python
from pl_run_program import run_program, run_simple_program, program_at_path
from pathlib import Path

# Paths are validated to ensure they're absolute, execuable, exist, etc.
echo_program = program_at_path(Path("/bin/echo"))

# run_program returns a ProgramResult object with stdout, stderr, and return code.
result = run_program(echo_program, ["Hello, World!"])
print(f"run_program result: {result}")

# run_simple_program is a convenience function that returns only stdout and raises an exception if the program returns a non-zero return code.
result = run_simple_program(echo_program, ["Hello, World!"])
print(f"run_simple_program result: {result}")
```

## Releasing

Run `./release.sh`.

## License

Licensed under the Apache License 2.0. See [LICENSE](./LICENSE).