Cannot find _socket module

In the Python library file Python34 / Lib / socket.py, the _socket module is imported:

import _socket
from _socket import *

but I could not find _socket anywhere in the library.

Can someone explain what _socket is?

+4
source share
1 answer

_socketis a shared library that provides the C implementation for the most part socket.py. (Indeed, the first line socket.pysays the module is a wrapper around _socket.) It is not intended to be used directly.

+2
source

Source: https://habr.com/ru/post/1613758/


All Articles