Coder Social home page Coder Social logo

bornalgo / py-cpp-bindings Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 421 KB

This is a Python utility for generating seamless bindings to C++ libraries, enabling you to effortlessly interface Python with existing C++ codebases.

License: MIT License

Shell 1.79% Batchfile 1.29% Python 96.92%
bash batch bindings castxml cpp ctypes ctypes-bindings dll header pyinstaller

py-cpp-bindings's Introduction

py-cpp-bindings

Seamless Python-C++ Integration Made Effortless

Example3_h Example3_py

"py-cpp-bindings" is a handy Python utility for generating seamless bindings to C++ libraries, enabling you to effortlessly interface Python with existing C++ codebases. This versatile tool streamlines the process of creating Pythonic wrappers around C++ classes, functions, and enums, making it easier than ever to harness the capabilities of C++ libraries from within Python.

Features

  • Automated Binding Generation: Quickly generate Python bindings for C++ code with minimal effort.
  • Versatile Compatibility: Works with a wide range of C++ libraries and projects.
  • Effortless Integration: Seamlessly incorporate C++ functionality into Python applications.
  • Advanced Type Handling: Handle complex C++ types, including pointer types and circular type definitions.
  • Flexible Configuration: Fine-tune the binding generation process to meet your specific needs.
  • Intuitive Usage: Enjoy a user-friendly interface for creating Pythonic wrappers.
  • Documentation and Examples: Documentation and illustrative examples to guide you through the process.

Unlock the full potential of your C++ libraries in Python with "py-cpp-bindings." Start bridging the gap between these two powerful programming languages today!

Prerequisites

  • Python Packages: You must have the following Python packages installed:

  • XML Generator: An XML generator tool is required to extract information from your C++ codebase. In this project, we have used the following XML generator tools:

Build

Windows

Execute the following command

.\buildWindows.bat

Linux

Execute the following command

./buildLinux.sh

Usage

Linux

build/LINUX-x86_64/dist/py-cpp-bindings/py-cpp-bindings --filenames examples/example1.h --output example/example1.py

Windows

Note that you need to change the --include-paths based on your OS file system.

build\Win64\dist\py-cpp-bindings\py-cpp-bindings.exe --filenames examples\example1.h --include-paths "C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" --output examples\example1.py

py-cpp-bindings's People

Contributors

bornalgo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.