libc._get_osfhandle in _pcap.py returns -1 on multiple version msvcrt runtime installed system.
from python's ctypes lib document
Note
Accessing the standard C library through cdll.msvcrt will use an outdated version of the library that may be incompatible with the one being used by Python. Where possible, use native Python functionality, or else import and use the msvcrt module.
since comment in _pcap.py, calls to msvcrt should keep align with runtime one, so use msvcrt.get_osfhandle make sense much more.
libc._get_osfhandle in _pcap.py returns -1 on multiple version msvcrt runtime installed system.
from python's ctypes lib document
since comment in _pcap.py, calls to msvcrt should keep align with runtime one, so use msvcrt.get_osfhandle make sense much more.