Skip to content

My-ABC/python-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python extension

中文文档 | English Document

1. Introduction

This project is an example of writing Python extensions in C . A simple Python extension is implemented in C that can the sum of two numbers.

2. Compilation

To compile the Python extension, execute the following command in the root of the project:

pip install .

3. Usage

from test import test
print(test.add(1, 2))  # Prints 3
# print(test.add()) #rows a test.ArgsError exception

or

python -m test

Enter first number: 1

Enter second number: 2

The sum of 1 and 2 is: 3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors