Is there anyone that is able to convert this small php snippet
fputs($sock,"\\status\\"); $gotfinal=False; $data="";
socket_set_timeout($sock,0,200000);
$starttime=Time();
while(!($gotfinal==True||feof($sock))) {
if(($buf=fgetc($sock))==FALSE) usleep(100);
$data.=$buf;
if(strpos($data,"final\\")!=False) $gotfinal=True;
if((Time() - $starttime)>2) {
$gotfinal=True;
}
}
fclose($sock);
$chunks=split('[\]',$data);
to Python??
I've got
global chunks
s.send("\\status\\")
final = False
while(final != True):
data = s.recv(1024)
if (len(data) <= 0): sleep(1); data = data, s.recvfrom(1024)
if(data.find("final\\") != False): final = True
chunks = data.split('\\')
But as you'll notice tis is not really a good match !!

Thanks for anyone that is able to help!
It would be greatly appriciated!! :banana: