Modules

Table of Contents
%Module — Definition of the (main) modules name
%Include — Include a file
%Import — Import module (dynamic library)

%Module

Name

%Module -- Definition of the (main) modules name

Synopsis

%Module module_name

Description

The module_name must be defined at least once. If multiple definitions are given the last one is used. The produced wrapping consists of the following files:

module_name.pyimport this and have fun
libmodule_namec.pyddynamic lib with the wrappers C code

Bear in mind, that you also need sip.lib and of course a lib with your classes to be wrapped.


%Include

Name

%Include -- Include a file

Synopsis

%Include include_file_name

Description


%Import

Name

%Import -- Import module (dynamic library)

Synopsis

%Import import_module_name

Description

The imported .sip file is parsed. %ExportedHeaderCode and %ExportedDoc sections are extracted. %HeaderCode, %C++Code, %ExposeFunction, %Copying, %PrePyCode, %PyCode, %Doc and %Makefile blocks are ignored.

The wrapping python file imports the dynamic lib libimport_module_namec (as .pyd or .dll) before libmodule_namec.

This does not mean though, that the imported lib is available as a wrapped module as well. To achieve this, you have to import import_module_name.py too.

$$$ I'm not sure whether i understand this correctly yet and where the advantage of this approach lies.