Skip to content

We create a wrapper from c code (with Swig) to test an INSERT from Python

Notifications You must be signed in to change notification settings

amadews23/Example-SQLite-Wrapper-for-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example-SQLite-Wrapper-for-Python

We create a wrapper from c code (with Swig) to test an INSERT from Python

THESE ARE THE STEPS TO COMPILE AND CREATE WRAPPER:

swig -python consulta.i

gcc -c consulta.c consulta_wrap.c -lsqlite3 -I /usr/include/python2.7 -fPIC

ld -shared consulta.o consulta_wrap.o -lsqlite3 -o _consulta.so

EXAMPLE TO USE (in the python console):

import consulta

consulta.Insertar(2, "Cadillac", 10000)

About

We create a wrapper from c code (with Swig) to test an INSERT from Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published