✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.36
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/distutils//lib2def.py
import re
import sys
import subprocess

__doc__ = """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
"""

__version__ = '0.1a'

py_ver = "%d%d" % tuple(sys.version_info[:2])

DEFAULT_NM = ['nm', '-Cs']

DEF_HEADER = """LIBRARY         python%s.dll
;CODE           PRELOAD MOVEABLE DISCARDABLE
;DATA           PRELOAD SINGLE

EXPORTS
""" % py_ver
# the header of the DEF file

FUNC_RE = re.compile(r"^(.*) in python%s\.dll" % py_ver, re.MULTILINE)
DATA_RE = re.compile(r"^_imp__(.*) in python%s\.dll" % py_ver, re.MULTILINE)

def parse_cmd():
    """Parses the command-line arguments.

libfile, deffile = parse_cmd()"""
    if len(sys.argv) == 3:
        if sys.argv[1][-4:] == '.lib' and sys.argv[2][-4:] == '.def':
            libfile, deffile = sys.argv[1:]
        elif sys.argv[1][-4:] == '.def' and sys.argv[2][-4:] == '.lib':
            deffile, libfile = sys.argv[1:]
        else:
            print("I'm assuming that your first argument is the library")
            print("and the second is the DEF file.")
    elif len(sys.argv) == 2:
        if sys.argv[1][-4:] == '.def':
            deffile = sys.argv[1]
            libfile = 'python%s.lib' % py_ver
        elif sys.argv[1][-4:] == '.lib':
            deffile = None
            libfile = sys.argv[1]
    else:
        libfile = 'python%s.lib' % py_ver
        deffile = None
    return libfile, deffile

def getnm(nm_cmd=['nm', '-Cs', 'python%s.lib' % py_ver], shell=True):
    """Returns the output of nm_cmd via a pipe.

nm_output = getnm(nm_cmd = 'nm -Cs py_lib')"""
    p = subprocess.Popen(nm_cmd, shell=shell, stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE, text=True)
    nm_output, nm_err = p.communicate()
    if p.returncode != 0:
        raise RuntimeError('failed to run "%s": "%s"' % (
                                     ' '.join(nm_cmd), nm_err))
    return nm_output

def 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.findall(nm_output)
    func = FUNC_RE.findall(nm_output)

    flist = []
    for sym in data:
        if sym in func and (sym[:2] == 'Py' or sym[:3] == '_Py' or sym[:4] == 'init'):
            flist.append(sym)

    dlist = []
    for sym in data:
        if sym not in flist and (sym[:2] == 'Py' or sym[:3] == '_Py'):
            dlist.append(sym)

    dlist.sort()
    flist.sort()
    return dlist, flist

def output_def(dlist, flist, header, file = sys.stdout):
    """Outputs the final DEF file to a file defaulting to stdout.

output_def(dlist, flist, header, file = sys.stdout)"""
    for data_sym in dlist:
        header = header + '\t%s DATA\n' % data_sym
    header = header + '\n' # blank line
    for func_sym in flist:
        header = header + '\t%s\n' % func_sym
    file.write(header)

if __name__ == '__main__':
    libfile, deffile = parse_cmd()
    if deffile is None:
        deffile = sys.stdout
    else:
        deffile = open(deffile, 'w')
    nm_cmd = DEFAULT_NM + [str(libfile)]
    nm_output = getnm(nm_cmd, shell=False)
    dlist, flist = parse_nm(nm_output)
    output_def(dlist, flist, DEF_HEADER, deffile)


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
11 Feb 2026 6.01 AM
root / root
0755
__pycache__
--
11 Feb 2026 6.01 AM
root / root
0755
checks
--
11 Feb 2026 6.01 AM
root / root
0755
command
--
11 Feb 2026 6.01 AM
root / root
0755
fcompiler
--
11 Feb 2026 6.01 AM
root / root
0755
mingw
--
11 Feb 2026 6.01 AM
root / root
0755
tests
--
11 Feb 2026 6.01 AM
root / root
0755
__config__.py
5.022 KB
20 Jan 2026 1.01 PM
root / root
0644
__init__.py
2.025 KB
20 Jan 2026 1.01 PM
root / root
0644
__init__.pyi
0.116 KB
20 Jan 2026 1.01 PM
root / root
0644
_shell_utils.py
2.552 KB
20 Jan 2026 1.01 PM
root / root
0644
armccompiler.py
0.939 KB
20 Jan 2026 1.01 PM
root / root
0644
ccompiler.py
27.947 KB
20 Jan 2026 1.01 PM
root / root
0644
ccompiler_opt.py
97.983 KB
20 Jan 2026 1.01 PM
root / root
0644
conv_template.py
9.313 KB
20 Jan 2026 1.01 PM
root / root
0644
core.py
7.981 KB
20 Jan 2026 1.01 PM
root / root
0644
cpuinfo.py
22.108 KB
20 Jan 2026 1.01 PM
root / root
0644
exec_command.py
10.042 KB
20 Jan 2026 1.01 PM
root / root
0644
extension.py
3.484 KB
20 Jan 2026 1.01 PM
root / root
0644
from_template.py
7.728 KB
20 Jan 2026 1.01 PM
root / root
0644
fujitsuccompiler.py
0.814 KB
20 Jan 2026 1.01 PM
root / root
0644
intelccompiler.py
4.135 KB
20 Jan 2026 1.01 PM
root / root
0644
lib2def.py
3.545 KB
20 Jan 2026 1.01 PM
root / root
0644
line_endings.py
1.984 KB
20 Jan 2026 1.01 PM
root / root
0644
log.py
2.812 KB
20 Jan 2026 1.01 PM
root / root
0644
mingw32ccompiler.py
21.55 KB
20 Jan 2026 1.01 PM
root / root
0644
misc_util.py
87.265 KB
20 Jan 2026 1.01 PM
root / root
0644
msvc9compiler.py
2.141 KB
20 Jan 2026 1.01 PM
root / root
0644
msvccompiler.py
2.585 KB
20 Jan 2026 1.01 PM
root / root
0644
npy_pkg_config.py
12.668 KB
20 Jan 2026 1.01 PM
root / root
0644
numpy_distribution.py
0.619 KB
20 Jan 2026 1.01 PM
root / root
0644
pathccompiler.py
0.696 KB
20 Jan 2026 1.01 PM
root / root
0644
setup.py
0.619 KB
20 Jan 2026 1.01 PM
root / root
0644
system_info.py
110.531 KB
20 Jan 2026 1.01 PM
root / root
0644
unixccompiler.py
5.299 KB
20 Jan 2026 1.01 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF