问题
on windows, what is the difference among the following?
import msvcrt as x
vs
x = ctypes.cdll.msvcrt
vs
x = ctypes.CDLL(find_library('c'))
vs
x = ctypes.CDLL(ctypes.util.find_msvcrt())
i believe the doc say the last two are equivalent. but the first two are never (clearly) documented, and seem strictly better. for instance, when running python from some other context that uses a different msvcr*.dll
(eg, matlab), replacing the third with the second solved this bug.
来源:https://stackoverflow.com/questions/30790494/what-are-the-differences-among-the-ways-to-access-msvcrt-in-python-on-windows