This repo has been ARCHIVED. Please see https://github.com/pvieito/PythonKit for a newer, better way to interoperate between Swift and Python
- OSX 10.12 (may work on a lower version, though this is untested)
- Swift version 3.1, swiftlang-802.0.53 (may work on a lower version, though this is untested)
- Python 2.7 (system Python)
git checkout develop
swift build
run demo
.build/debug/PySwift_Demo
- Run Python code from string,
- Load Python module,
- Call Python functions, and methods on Python objects, with positional and named arguments,
- Convert String, Int, Float, Array/List between Swift & Python,
- Getting/setting attributes from object.
see Demo
- DOCUMENT ALL THE THINGS
- Support more types for « toll-free » bridging of objects between Swift and Python,
- Smooth things out and allow manual creation of Python counterparts for Swift custom classes (essentially, just like #2 but for your own classes),
- Automagic creation of Python wrappers for Swift objects (eventually).
Do your things and submit a PR. Alternatively, I'll soon put up a list of small things to do, in addition to the Todo.