John J. Lee wrote: > [...] >> The simplest solution is to replace the above line with >> >> parser.feed(socket.read().replace(" ", "NaN") > [...] > > That's platform-dependent, if you're relying on float("NaN"). Actually, I'm not, any non-empty string would have done as well, given the original poster's parser implementation. Peter