Giter Site home page Giter Site logo

dhuckins / python-c-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from starnight/python-c-extension

0.0 1.0 0.0 140 KB

This is the practice of Python C extensions.

License: BSD 3-Clause "New" or "Revised" License

Makefile 5.88% C 65.07% C++ 9.19% Python 19.86%

python-c-extension's Introduction

Python C extension

This is the practice of Python C extensions. It is Python3 that I am practicing now!

Files in each directory

  • test.py: The test codes to run the module built from the C extension files.
  • setup.py: The file for Python to build the C extension module.
  • bind.c: The Python wrapper interface for the C extension module.
  • libmypy.h: The header file of C extension module.
  • libmypy.c: The source file of C extension module.
  • Makefile: Aggregate the building scripts.

00-HelloWorld

It is a general hello world practice. One may start from here for the simplest Python C extension example.

01-HeyMan

It is a C extension practice who gets arguments passed from Python. The heyman function will echo the passed name and the number.

02-Add

It is an adding function which will not only gets arguments passed from Python, but also returns a tuple that is composite of the result and the equation string.

03-CrossVersion

It is a cross version example that shows how to port between Python 2 and Python 3.

python-c-extension's People

Contributors

starnight avatar

Watchers

James Cloos 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.