Module Instant :: Class Instant
[show private | hide private]
[frames | no frames]

Class Instant


Method Summary
  __init__(self)
Instant constructor
  check_md5sum(self)
Check if the md5sum of the generated interface file has changed since the last time the module was compiled.
  clean(self)
Clean up files the current session.
  create_extension(self, **args)
Call this function to instantly create an extension module.
  debug(self)
print out all instance variable
  generate_Interfacefile(self)
Use this function to generate a SWIG interface file.
  generate_Makefile(self)
Generates a project dependent Makefile, which includes and uses SWIG's own Makefile to create an extension module of the supplied C/C++ code.
  generate_setup(self)
Generates a setup.py file
  getmd5sumfiles(self, filenames)
get the md5 value of filename modified based on Python24\Tools\Scripts\md5sum.py
  parse_args(self, dict)
A method for parsing arguments.
  writemd5sumfile(self, filenames, md5out)

Method Details

__init__(self)
(Constructor)

Instant constructor

check_md5sum(self)

Check if the md5sum of the generated interface file has changed since the last time the module was compiled. If it has changed then recompilation is necessary.

clean(self)

Clean up files the current session.

create_extension(self, **args)

Call this function to instantly create an extension module. SWIG is used to generate code that can be compiled and used as an ordinary Python module.

Arguments:

  • code:
    • A Python string containing C or C++ function, class, ....
  • module:
    • The name you want for the module (Default is 'instant_swig_module'.). String.
  • swigopts:
    • Options to swig, for instance -lpointers.i to include the SWIG pointers.i library. String.
  • init_code:
    • Code that should be executed when the Instant extension is imported. String.
  • system_headers:
    • A list of system header files required by the Instant code.
  • local_headers:
    • A list of local header files required by the Instant code.
  • wrap_headers:
    • A list of local header files that should be wrapped by SWIG.
  • include_dirs:
    • A list of directories to search for header files.
  • sources:
    • A list of source files to compile and link with the extension.
  • cppargs:
    • Flags like -D, -U, etc. String.
  • libraries:
    • A list of libraries needed by the Instant extension.
  • library_dirs:
    • A list of directories to search for libraries (-l).
  • object_files:
    • If you want to compile the files yourself. NOT YET SUPPORTED.
  • arrays:
    • A list of the C arrays to be made from NumPy arrays.

debug(self)

print out all instance variable

generate_Interfacefile(self)

Use this function to generate a SWIG interface file.

To generate an interface file it uses the following class-variables:
  • code
  • ifile_name (The SWIG input file)
  • init_code (Code to put in the init section of the interface file)
  • system_headers (A list of system headers with declarations needed)
  • local_headers (A list of local headers with declarations needed)
  • wrap_headers (A list of local headers that will be wrapped by SWIG)

generate_Makefile(self)

Generates a project dependent Makefile, which includes and uses SWIG's own Makefile to create an extension module of the supplied C/C++ code.

generate_setup(self)

Generates a setup.py file

getmd5sumfiles(self, filenames)

get the md5 value of filename modified based on Python24\Tools\Scripts\md5sum.py

parse_args(self, dict)

A method for parsing arguments.

Generated by Epydoc 2.1 on Tue Jan 30 13:30:03 2007 http://epydoc.sf.net