Language interoperability for coders with impatient users.
Video of talk available here (click on image):
Python is a general-purpose programming language that is well-suited for a web application stack. That said, there are sometimes opportunities to increase performance or productivity by mixing the benefits of different languages, such as the expressiveness of Python with the speed of C++.
This repository contains the implementations of the techniques and ideas that were explored in a talk I gave at PyGotham 2015. If you missed the talk, it focused on interactions between Python and other programming languages within the context and contraints of coding for web applications.
The slides should be uploaded within a day of the talk and the video should be linked here when available (please open a GH issue if this is not the case).
This repository contains a web application useful for testing various FFI approaches.
- Python 3.4
- Python 3.4 header files (python3.4-dev on Debian-based OSes if Python not from source)
- OS X or Linux
- A C and C++ compiler
- If OS X, probably Xcode command-line tools
- Buyer's choice on Linux (gcc is popular)
Python versions > 3.4 should also work, but have not been tested.
git clone https://github.com/tristanfisher/ffi4wd.git
Use a virtual environment to create a clean environment so our work and package installations don't affect other things on the system.
cd ffi4wd
pyvenv-3.4 env
source env/bin/activate
Make sure that you're in Python 3.4 and that your virtualenv is activated.
Run the makefile
:
make all
this will install the Python requirements and compile several shared objects.
This will give us some certainty that we've installed correctly.
I appreciate feedback. Please open pull requests, issues, and/or contact me.