Registry / testing / pyats-tcl

pyats-tcl

JSON →
library26.5pypypiunverified

pyATS Tcl is a sub-component of the pyATS testing ecosystem, specializing in Tcl integration within Python. It provides an `Interpreter` class to extend the native Python-Tcl interaction, enabling two-way typecasting between Tcl and Python data structures and reusing existing Tcl libraries. pyATS is currently at version 26.3 and maintains an active development cycle with frequent releases for the broader pyATS framework.

pip install pyats.tcl
INSTALL
IMPORT
SIG · PYATS-TCL
P
pyats-tcl
testingpythonv26.5
Install
5.8s avg
Import
Disk
67MB
Pass rate
7/ 10
Env Coverage7 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v26.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 6.45s
py 3.11
✕ build_error
✓ 5.53s
py 3.12
✕ build_error
✓ 4.43s
py 3.13
✕ build_error
✓ 4.78s
py 3.9
✓ —
✓ 7.6s
67MB installed
● package 67MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Interpreter
from pyats.tcl import Interpreter
from pyats.tcl import Interpreter

This quickstart demonstrates how to initialize a pyATS Tcl interpreter, execute Tcl commands, retrieve variable values, and perform basic typecasting between Tcl and Python data structures.

from pyats.tcl.interpreter import Interpreter # Create a new Tcl interpreter instance tcl_interpreter = Interpreter() # Execute a simple Tcl command result = tcl_interpreter.eval('set my_tcl_variable "Hello from pyATS Tcl!"') print(f"Tcl command result: {result}") # Retrieve the value of a Tcl variable tcl_var_value = tcl_interpreter.eval('set my_tcl_variable') print(f"Value of my_tcl_variable: {tcl_var_value}") # Demonstrate basic typecasting (an enhancement over native tkinter.Tcl) tcl_list_str = '{item1 item2 item3}' py_list = tcl_interpreter.typecast(tcl_list_str, 'list') print(f"Tcl list '{tcl_list_str}' typecasted to Python list: {py_list}")
Debug
Known issues
breakingpyATS (and consequently pyats-tcl) dropped support for Python 3.6 after April 2022. Users must migrate to Python 3.8 or newer.
fix
Upgrade your Python environment to 3.8 or a later supported version (e.g., Python 3.8, 3.9, or 3.10).
affects: < 22.5
gotchapyATS and its components, including pyats-tcl, currently do not support Windows operating systems. They are designed for Linux and macOS environments.
fix
Run pyATS and pyats-tcl within a Linux or macOS environment, or use a virtual machine or Docker container on Windows.
affects: All versions
gotchaThe underlying `tkinter` module (which `pyats-tcl` wraps) requires Tcl header files and successful linking during Python's compilation. If `tkinter` is not properly compiled with Tcl/Tk support, `pyats.tcl` functionality may fail.
fix
Ensure that Tcl/Tk development packages are installed on your system before compiling Python, or use a Python distribution where `tkinter` is pre-compiled with Tcl/Tk support. The `build_python` script supplied with pyATS installations typically handles this.
affects: All versions
gotchaWhen using `pyats.topology.Testbed` with `testbed.connect()` and subsequently attempting operations like `testbed.parse()`, if some devices fail to connect, `testbed.parse()` might encounter `TypeError: 'NoneType' object is not iterable` because it tries to operate on non-connected devices.
fix
Implement error handling or check device connection status explicitly before performing operations. Filter the list of devices to only include those that successfully connected, or configure `testbed.connect()` to handle partial failures gracefully and provide status for each device.
affects: All versions
Upgrade
Version history
26.5latest on PyPI · released May 28, 2026
Audit
Dependencies
pyatsrequiredpyats-tcl is a sub-component of the larger pyATS framework.
tkinterrequiredpyats-tcl wraps the native Python tkinter module for Tcl integration. tkinter requires Tcl/Tk development headers to be present during Python compilation, though pyATS installation scripts often handle this.
PythonrequiredRequires Python 3.8 or higher.
Agent activity
17 hits · last 30 days
node
16
Amazon
1
Resources
pyats-tcl — pip install pyats-tcl · libregistry