Skip to content
/ c2py Public

Create python wrappers that call c functions, without the headaches.

License

Notifications You must be signed in to change notification settings

i2mint/c2py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c2py

Create python wrappers that call c functions, without the headaches.

In a nutshell:

from c2py import dispatch
m = dispatch(
    src,  # specification of the C sources (poiting to specific C functions)
	convention,  # optional convention of wrapping rules
	**configs  # specific configuration (for wrapping rules that are not covered by convention, or need to be overwritten)
)

m.python_wrapper_to_c_func(...)  # now m is a module containing python wrappers to the desired c functions

Other forms:

dispatch_to_file(src, target_filepath, ...)  # to get output as a persisted .py file

To install: pip install c2py

About

Create python wrappers that call c functions, without the headaches.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published