Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6890335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:16:08+00:00 2026-05-27T06:16:08+00:00

Can APIs written in C or C++ always be made into a library, given

  • 0

Can APIs written in C or C++ always be made into a library, given source code, and consequently be called from Python, due to the intrinsic callable nature of an API?

In other words, given a C/C++ API can you run a setup.py script using distutils on the source and effectively use the C/C++ API from python programs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:16:08+00:00Added an answer on May 27, 2026 at 6:16 am

    It’s a bit more involved than running a setup.py script, but there are tools to wrap C/C++ libraries so you can use them from Python. Some popular ones are:

    • Cython – you write Python-style code, but you can cimport C libraries and call their functions. Cython code is then translated to C and compiled. There’s an unsupported tool called cython-codegen to automate writing a simple wrapper.
    • boost.python – For wrapping C++ libraries.
    • SWIG
    • ctypes – Load compiled libraries and call them directly from Python. ctypesgen tries to automatically write a wrapper based on header files.

    Certain projects use other tools to generate Python bindings, and they could probably be reused (with varying amounts of effort). PyQt4 uses SIP, PySide (another Qt binding) has shiboken, and GTK et al. have Gobject introspection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code written in any programming language. How can I prettify it (bold
I've written my first Python application with the App Engine APIs, it is intended
Can anyone recommend a good library for generating an audio file, such as mp3,
Let's take the example of mint.com. I can easily see the HTML/CSS source but
I am implementing a python script to do fuse mount programatically. I have written
Question Given a Classpath Container I've written as a plugin/extension, how do I add
How can data written to a file really be flushed/synced with the block device
I have written a C based library and for it to work in multi-thread
I've written a working grammar to replace dbunit in scala called ScalaDBTest. The whole
Can somebody point me to a resource that explains how to go about having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.