ImportError: dynamic module does not define init function(initmymodule)

Balaji balaji at
Thu Aug 12 01:11:46 CEST 2004

I have an c++ header file.


#ifndef _SOME_CLASS_H_
#define _SOME_CLASS_H_

class SomeClass
	int sqr(int a);
#endif //_SOME_CLASS_H_

and I have an definition file some_class.C


#include "some_class.h"

int SomeClass::sqr(int a){
	return a*a;
And I have an interface file
%module mytest
#include "some_class.h"
%include "some_class.h"

My question is when I try to import mytest in python it does import it
but I'm not able to access the SomeClass..

Can anyone help..



When I try to conver this into python module by using SWIG I manage to

More information about the Python-list mailing list