SIP

omnia neo neo.omnia7 at gmail.com
Fri Apr 9 07:01:51 CEST 2010


Hi All,

I was looking at the SIP tool to create a C extensions for python to
call.
Here is what I tried:
1. I created a  simple c file and .h file <attached testfunc.c and
testfunc.h>
2. Then I created a corresponding testfunc.sip file
###################
%CModule siptest 0

%UnitCode
	#include"testfunc.h"
%End

void pyfunc();
%MethodCode
	func1();
%End
####################

3. I ran SIP  <command:  sip -e -j 1 -c . testfunc.sip> on this which
generated the following files:
sipsiptestpart0.c and sipAPIsiptest.h
4. I then added these generated files along with testfunc.c and
testfunc.h in my MS Visual studios solution to create a testsip.dll
file
5. Now to call my module from this dll I invoke a script which tries
to import my modules. My pythn call is as follows:

#code#
import siptest

I get following error :
import error : no module named siptest

Please help me find what I am not doing or what mistake am i commiting.



More information about the Python-list mailing list