[issue1793] ctypes.util.find_msvcrt() function
Thomas Heller
report at bugs.python.org
Fri Jan 11 19:27:02 CET 2008
Thomas Heller added the comment:
The cross-platform function is ctypes.util.find_library, which is
currently not very useful on Windows.
This patch changes it so that, on Windows, find_library("c") or
find_library("m") finds the MS C runtime lib which exposes functions the
are typically in libc and libm.
The runtime lib in Windows is special anyway; the 'open' function, for
example, is exported as '_open'.
However, the easiest way on Linux (don't know about other platforms) to
load the C runtime lib is to use ctypes.CDLL(None), which translates to
dlopen(NULL) in C. Linux exposes all symbols from all loaded libraries
to the returned handle.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1793>
__________________________________
More information about the Python-bugs-list
mailing list