HOME/Articles/

socket example SocketThread com main init (snippet)

Article Outline

Python socket example 'SocketThread com main init '

Modules used in program:

  • import socket
  • import sys

python SocketThread com main init

Python socket example: SocketThread com main init

import sys
sys.path.append("D:\\python_code\\SocketThread\\com\\bean")
from User import User
import socket

soc = socket.socket()

u = User(soc,'guo')
print(u)