select.select issue for sockets and pipes
问题 I am currently in the process of writing a basic python script that makes use of both pipes and sockets. The pipe currently holds incoming data from an html form, the socket makes up a connection to a server that sends TCP/IP commands at various intervals. The form and server are on the same LAN but different computers. The code I have is as follows: #!/usr/bin/env python import os,sys,time from socket import * HOST = 'xxx.xxx.xxx.xxx' PORT = 6000 BUFSIZ = 1024 ADDR = (HOST, PORT) tcpCliSock