I'm working on some simple socket programming.
But I'm not on the most effective way to search for strings once I've assigned
buff = skt.recv(some_length).

On the client I'm writing currently, I am expecting ASCII strings, like 'mem_usage' 'ip_config'
etc.

Thanks.

What's the content of buff ? socket.recv() can receive arbitrary data.

In this instance it's ASCI strings from a telnet server. But in generally I'd like to know ways to handle different types of data, etc.

The best thing to do is to post an example of a received string, and tell us which data you want to extract from this string.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.