Course SCI103
Integrating Python with C anc C++
Integrating Python with C anc C++
Duration: 2 Days
Synopsis
This course provides an intensive overview of mixed language Python and C, C++ programming. A wide variety of techniques are explored including Swig to encapsulate C/C++ code in Python, Weave for inlining C/C++ in Python applications, ctypes, Cython and numeric computing using the numpy C API.
Prerequisites
Attendees are expected to be experienced Python, C and C++ programmers. Experience with previous mixed language programming e.g. Java - C++, or Lisp - C would be an advantage.Course Outline
Python, C, C++ Mixed Language Programming
- Using SWIG to integrate (encapsulate) legacy C / C++ code
- Using inline C/C++ in Python applications through Weave
- Using ctypes to access shared libraries
- Cython
- Theory and practice
- Creating new extension modules in Cython
- Working with the NumPy C-API
- Memory management, smart pointers and C++ object handling
- In-lining C/C++ in a Python application using Weave
- Managing memory and dealing with C++ objects
