Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ObjectProfile/PythonBridge
Bridge between smalltalk and python
https://github.com/ObjectProfile/PythonBridge
pharo pharo-smalltalk python python3 pythonbridge smalltalk
Last synced: 2 months ago
JSON representation
Bridge between smalltalk and python
- Host: GitHub
- URL: https://github.com/ObjectProfile/PythonBridge
- Owner: ObjectProfile
- License: mit
- Created: 2018-12-02T03:51:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T21:52:32.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T20:32:29.594Z (3 months ago)
- Topics: pharo, pharo-smalltalk, python, python3, pythonbridge, smalltalk
- Language: Smalltalk
- Size: 401 KB
- Stars: 22
- Watchers: 5
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pharo - PythonBridge - A bridge between Python and Pharo. This bridge allows to seamlessly use Python libraries in Pharo (System interaction)
README
# PythonBridge
Bridge that allows executing arbitrary pieces of Python code directly from Pharo.
The official webpage and documentation is https://objectprofile.github.io/PythonBridge/.# Requirements
This project depends on Python3.6 (or Python3.7) and Pipenv.
# Installation
To install PythonBridge on Pharo just run the following script in a Pharo Playground:
```Smalltalk
Metacello new
baseline: 'PythonBridge';
repository: 'github://ObjectProfile/PythonBridge/src';
load.
```
The first part of the script is responsible of downloading the PythonBridge code and loading it in the image.
The second part of the script is responsible of creating a pipenv environment for isolating the python libraries used by the bridge.Depending on the internet connection, the script could take a couple of minutes to run.
A more in depth guide is present on the official website of this project https://objectprofile.github.io/PythonBridge/.
[Video installation for VisualWorks](https://vimeo.com/401196404)
# Simple test
Evaluating the following code in a playground should return `3`:
```Smalltalk
PBApplication do: [
PBCF << (P3GBinaryOperator new
left: 1;
right: 2;
operator: $+;
yourself).
PBCF send waitForValue
]
```