Replace Tcl scripting with Python
Project description
NoTcl: Replace Tcl scripting with Python
Many tools, especially in VLSI and digital circuit design, expose their functionality through a custom Tcl interpreter. In order to automate those programs, users are expected to write Tcl scripts. With growing complexity, such Tcl scripts become difficult to maintain and often do not integrate seamlessly into larger software systems.
NoTcl allows Tcl-based tools to be automated using Python instead of Tcl. It wraps each tool in a Python interface, turning it into a library that can be imported, tested, and integrated like any other Python package. Python's module system, testing frameworks, and rich ecosystem make it better suited for complex automation than Tcl scripts. NoTcl handles subprocess management and communication via named pipes, exposing a Python API for calling Tcl commands.
Installation
pip3 install notcl
Quick Start
Define a custom tool by subclassing TclTool:
from notcl import TclTool
class Tclsh(TclTool):
def cmdline(self):
return ["tclsh", self.script_name()]
with Tclsh() as t:
result = t.expr(3, "*", 5) # Call Tcl commands as Python methods
print(result) # 15
items = t.lreverse([1, 2, 3]) # Automatic type conversion
To dive in deeper, please have a look at the documentation.
Related Tools
- pydesignflow — A technology- and tool-agnostic micro-framework for constructing FPGA and VLSI design flows in Python. Uses NoTcl to automate Tcl-based EDA tools like Yosys and OpenROAD.
Example Projects
- RISC-V Lab: An FPGA-based RISC-V design platform and flow for teaching SoC development, using PyDesignFlow to manage hardware synthesis, simulation, and software builds..
License
Copyright 2022 - 2026 Tobias Kaiser
SPDX-License-Identifier: Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notcl-0.4.1.tar.gz.
File metadata
- Download URL: notcl-0.4.1.tar.gz
- Upload date:
- Size: 33.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcafced96b6286c1c1ff95e6d3bf7783dc36dc062166bca56a231cd290e85911
|
|
| MD5 |
6bef4f3d69505d274beab65b82e3d69c
|
|
| BLAKE2b-256 |
5bf3a661b628d63bc30797b26d96cdc8cf2b511746b2d2d485b295d0b285ca06
|
File details
Details for the file notcl-0.4.1-py3-none-any.whl.
File metadata
- Download URL: notcl-0.4.1-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9b3498b12ec51437a0ac538777e8b176cd40ab217c30ecca2f9ab6f691915e8
|
|
| MD5 |
9db185ec813a502a4dc4e130ff886d74
|
|
| BLAKE2b-256 |
1cba2650de8d1e2bc2d3abbbbd440465c7718d0bba34e4baabf4e27e8813dc2f
|