Package instant
[hide private]
[frames] | no frames]

Package instant

source code

Instant allows compiled C/C++ modules to be created at runtime in your Python application, using SWIG to wrap the C/C++ code.

A simple example: >>> from instant import inline >>> add_func = inline("double add(double a, double b){ return a+b; }") >>> print "The sum of 3 and 4.5 is ", add_func(3, 4.5)

The main functions are build_module, write_code, and inline* see their documentation for more details.

For more examples, see the tests/ directory in the Instant distribution.

Questions, bugs and patches should be sent to instant-dev@fenics.org.


Version: 0.9.5

Date: 2008-10-20

Author: Kent-Andre Mardal <kent-and@simula.no>, Martin Alnes <martinal@simula.no>, Magne Westlie

Submodules [hide private]
  • instant.build: This module contains the main part of Instant, the build_module function.
  • instant.cache: This module contains helper functions for working with the module cache.
  • instant.codegeneration: This module contains helper functions for code generation.
  • instant.config: This module contains helper functions for configuration using pkg-config.
  • instant.inlining: This module contains the inline* functions, which allows easy inlining of C/C++ functions.
  • instant.output: This module contains internal logging utilities.
  • instant.paths: This module contains helper functions for working with temp and cache directories.
  • instant.signatures: This module contains helper functions for working with checksums.