numpy.distutils.lib2def (version 0.1a)
index
/usr/lib/python2.6/dist-packages/numpy/distutils/lib2def.py

This module generates a DEF file from the symbols in
an MSVC-compiled DLL import library.  It correctly discriminates between
data and functions.  The data is collected from the output of the program
nm(1).
 
Usage:
    python lib2def.py [libname.lib] [output.def]
or
    python lib2def.py [libname.lib] > output.def
 
libname.lib defaults to python<py_ver>.lib and output.def defaults to stdout
 
Author: Robert Kern <kernr@mail.ncifcrf.gov>
Last Update: April 30, 1999

 
Modules
       
os
re
subprocess
sys

 
Functions
       
getnm(nm_cmd=['nm', '-Cs', 'python26.lib'])
Returns the output of nm_cmd via a pipe.
 
nm_output = getnam(nm_cmd = 'nm -Cs py_lib')
output_def(dlist, flist, header, file=<open file '<stdout>', mode 'w' at 0x7f8ebf96b140>)
Outputs the final DEF file to a file defaulting to stdout.
 
output_def(dlist, flist, header, file = sys.stdout)
parse_cmd()
Parses the command-line arguments.
 
libfile, deffile = parse_cmd()
parse_nm(nm_output)
Returns a tuple of lists: dlist for the list of data
symbols and flist for the list of function symbols.
 
dlist, flist = parse_nm(nm_output)

 
Data
        DATA_RE = <_sre.SRE_Pattern object at 0x6fcae20>
DEFAULT_NM = 'nm -Cs'
DEF_HEADER = 'LIBRARY python26.dll\n;CODE PRE...CARDABLE\n;DATA PRELOAD SINGLE\n\nEXPORTS\n'
FUNC_RE = <_sre.SRE_Pattern object at 0x6fcb590>
__file__ = '/usr/lib/python2.6/dist-packages/numpy/distutils/lib2def.pyc'
__name__ = 'numpy.distutils.lib2def'
__package__ = 'numpy.distutils'
__version__ = '0.1a'
py_ver = '26'