Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not find _socket module

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

import _socket
from _socket import *

but I couldn't find _socket anywhere in the library.

Could anybody explain what is _socket?

like image 676
OpenCV_fan Avatar asked Oct 18 '22 23:10

OpenCV_fan


1 Answers

_socket is a shared library that provides the C implementation of much of socket.py. (Indeed, the first line of socket.py says the module is a wrapper around _socket.) It isn't meant to be used directly.

like image 143
chepner Avatar answered Oct 21 '22 23:10

chepner