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@lists.launchpad.net.


Version: 1.2.0

Date: 2013-03-24

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

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.locking: File locking for the cache system, to avoid problems when multiple processes work with the same module.
  • 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.

Variables [hide private]
  PIPE = -1
  STDOUT = -2
  __package__ = 'instant'