GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PANDATD/CandPythonBridge: This Repo contains all info about how to call the c function in python.

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
c
c
 
 
cpp
cpp
 
 
go
go
 
 
python
python
 
 
.gitattributes
.gitattributes
 
 
.replit
.replit
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
_config.yml
_config.yml
 
 
main.sh
main.sh
 
 

Repository files navigation

CandPythonBridge

A learning example for calling C functions from Python with ctypes.

Basic workflow

  1. Write the C function in a source file.
  2. Declare the function in a header file.
  3. Compile the C source as a shared library.
  4. Load the shared library from Python with ctypes.CDLL.
  5. Call the exported function from Python.

The exact compiler command depends on the operating system and compiler. The older example in this repository uses Linux-style shared-library tooling and should be adapted rather than copied unchanged to every platform.

Author

Tejas Dixit — https://tejasdixit.in

About

This Repo contains all info about how to call the c function in python.

Topics

cc-example-codec-extensioncppgithubgopython

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.