This repository has not yet been updated with the latest fixes for the Prague demo.
Please be patient for a couple more days.
E.T.A.: Wednesday 22nd Nov 2017.
This repository will be reset at that time, due to changes in the private repository conversion and anonymization.
Kind regards, Tijs Wickardt
The Paneadra Python Bridge enables you to embed the CPython interpreter into a runtime that supports dynamic loading of Unix shared objects and/or Windows DLLs.
It was written for embedding CPython into the Progress OpenEdge ABL runtime, to facilitate software integration with various third party projects.
The Paneadra Python Bridge is written in C. Supported platforms are currently: Windows, Linux, IBM AIX.
As an example, here is the runbook for compiling on a standard Ubuntu Xenial x64 distibution, running on Vagrant plus VirtualBox on a Windows workstation.
- Create a
panaedra
folder somewhere on your windows machine - Add an environment variable
PanaedraWorkspace
that points to the folder above. End with an extra backslash.- Example:
PanaedraWorkspace=C:\work\panaedra\
- Example:
- Pull the
panaedra_c_pythonbridge
repository into the%PanaedraWorkspace%
folder - Install Vagrant and VirtualBox, make sure VTX is on in your BIOS, and setup a vagrant machine of Ubuntu Xenial x64, latest version
- Go to the vagrant vm folder, and halt the vm:
cd /d "C:\vm\ubuntu.xenial64" vagrant halt
- Put the following in the
Vagrantfile
:config.vm.synced_folder "../../work/panaedra", "/panaedra"
- Go to the vagrant vm folder, and up the vm, plus putty:
cd /d "C:\vm\ubuntu.xenial64" vagrant up vagrant putty
- From the ssh terminal, install prerequisites and create the shared object:
sudo apt install python 2.7-dev sudo apt install python-dev cd "/panaedra/panaedra_c_pythonbridge/src/panaedra/mxroot/mxpython/c_source/" # Compiling gcc $(python2.7-config --cflags) -fPIC -c panaedra_pythonbridge.c # Linking, create shared object. # Note: Do an explicit link to libpython as well, because OE does not allow undefined symbols (even when they are fine at runtime). # Symptoms: # DLL Error : /panaedra/panaedra_c_pythonbridge/src/panaedra/mxroot/mxpython/c_source/panaedra_pythonbridge.so # undefined symbol: _PyByteArray_empty_string (8014) # Could not load DLL procedure panaedra/mxroot/mxpython/c_source/panaedra_pythonbridge.so. (3258) # Ref: https://github.com/Cantera/cantera/issues/319 , https://stackoverflow.com/questions/16112310/explicitly-linking-a-local-shared-object-library , gcc $(python2.7-config --cflags --ldflags) -shared -o panaedra_pythonbridge.so panaedra_pythonbridge.o -lc /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 # Intermediate object file can be removed rm panaedra_pythonbridge.o # Do a quick check for undefined symbols (see above) ldd -r panaedra_pythonbridge.so
- If you are a Progress OpenEdge user, now's a good time to look at the
panaedra_oe_demo_lowdep
repository, to see the Python Bridge in action.