About 51 results
Open links in new tab
  1. Basic Python client socket example - Stack Overflow

    I've been trying to wrap my head around how sockets work, and I've been trying to pick apart some sample code I found at this page for a very simple client socket program. Since this is basic sampl...

  2. Can someone please explain the difference between "from socket …

    Dec 9, 2015 · 2 I'm new to Python and networking and I know my question may sound redundant, but I have spent hours researching the difference between from socket import * and import socket and the …

  3. python - Pythonのsocket通信のfromとimportについて - スタック・ …

    Oct 1, 2019 · Pythonのfromとimportの使い方について質問です。 from socket import socket socket.gethostbyname (socket.gethostname ()) だとエラーになって AttributeError: type object …

  4. python - import _socket: "Import Error: DLL load failed" - Stack Overflow

    File "c:\python27\lib\httplib.py", line 71, in <module> import socket File "c:\python27\lib\socket.py", line 47, in <module> import _socket ImportError: DLL load failed: The specified procedure could not be …

  5. python - Error while trying to import socket? - Stack Overflow

    I've recently installed python, ipython and pip, with pip I've installed the socket library, and plenty others, now I can't import socket while running python program through cmd but I can do it us...

  6. Handling a timeout error in Python sockets - Stack Overflow

    In the above code with from socket import *, you just want to catch timeout as you've pulled timeout into your current namespace. from socket import * pulls in the definitions of everything inside of socket, …

  7. How can I use Python to get the system hostname?

    Nov 25, 2010 · Use socket and its gethostname() functionality. This will get the hostname of the computer where the Python interpreter is running:

  8. When I import socket in python, why does it skip socket.bind?

    Jan 20, 2014 · from socket import bind I get "ImportError: cannot import name bind" Otherwise, dir (socket) returns 297 and everything else seems to work fine. Like I have socket.socket, …

  9. how to use threading in sockets in python? - Stack Overflow

    Jun 9, 2022 · I have a following code that handle with sockets in Python: import socket HOST = "127.0.0.1" PORT = 4999 TIMEOUT = 1 with socket.socket (socket.AF_INET, …

  10. python - socket "import" does not work "from" does! Whats the deal ...

    Jul 22, 2014 · I am just starting on python and am trying to use it to do some basic network routines. I have 2 pieces of code that do the same thing, one working and the other not. When I use the from …