Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amykyta3/tclpython
Tcl package that provides access to a Python interpreter
https://github.com/amykyta3/tclpython
Last synced: 2 months ago
JSON representation
Tcl package that provides access to a Python interpreter
- Host: GitHub
- URL: https://github.com/amykyta3/tclpython
- Owner: amykyta3
- License: gpl-3.0
- Created: 2017-09-20T05:11:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-01T02:20:09.000Z (over 2 years ago)
- Last Synced: 2024-08-03T18:16:01.020Z (6 months ago)
- Language: C
- Homepage:
- Size: 59.6 KB
- Stars: 15
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeInterpreter - tclpython
README
[![build](https://github.com/amykyta3/tclpython/workflows/build/badge.svg)](https://github.com/amykyta3/tclpython/actions?query=workflow%3Abuild+branch%3Amaster)
# TclPython
This package allows the execution of Python code from a Tcl interpreter.
The Python interpreter is accessed using the `tclpython3` package:
```tcl
package require tclpython3
set interpreter [python3::interp new]
$interpreter exec {print("Hello World")}
puts [$interpreter eval 3/2.0]
python3::interp delete $interpreter
```## Installing (Linux)
### 1. Install Dependencies
#### Debian
```bash
sudo apt install python3-dev tcl-dev
```#### Red Hat
```bash
sudo yum install python3-devel tcl-devel
```### 2. Determine install path
Tcl package installation paths vary depending on the platform.Either pick one that looks right from the output of the following:
```bash
echo 'foreach p $auto_path {puts $p}' | tclsh
```... or create a new location, and add it to the `TCLLIBPATH` environment variable:
```bash
export TCLLIBPATH=$TCLLIBPATH:/path/to/my/tcl/packages
```### 3. Compile from source
```bash
make
make test
make install INSTALL_DIR=path/from/step/2
```## Installing (Windows)
See [msvc/README.md](msvc/README.md)