#!/usr/bin/python # import urllib # import sys # # link = "http://"+sys.argv[1]+":8080" # Change this address to your settings # f = urllib.urlopen(link) # myfile = f.read() # # print(myfile.split(" ")) import socket import time server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.connect(('192.168.2.2', 80)) # while(True): server.send("temperature") response = server.recv(1024) print(response) # time.sleep(10) server.close() # while 1: # data = client_socket.recv(512) # if ( data == 'q' or data == 'Q'): # client_socket.close() # break; # else: # print "RECIEVED:" , data # data = raw_input ( "SEND( TYPE q or Q to Quit):" ) # if (data <> 'Q' and data <> 'q'): # client_socket.send(data) # else: # client_socket.send(data) # client_socket.close() # break;