Python class w/ Telnet interface to memcached
The pattern

self.client.write("some command\n")
response = self.client.read_until('END')


appears three times in your code. I think this is often enough to warrant refactoring it into its own method like this:

def command(self, cmd):
    self.client.write("%s\n" % cmd)
    return self.client.read_until('END')




In key_details you're using extend to build up a list. However it's more pythonic to use list comprehensions than building up a list imperatively. Thus I'd recommend using the following list comprehension:

regex = 'ITEM (.*) \[(.*); (.*)\]'
cmd = "stats cachedump %s 100"
keys = [key for id in slab_ids for key in re.findall(regex, command(cmd % id))]




Afterwards you do this:

if sort:
    return sorted(keys)
return keys


Now this might be a matter of opinion, but I'd rather write this using an else:

if sort:
    return sorted(keys)
else:
    return keys


I think this is optically more pleasing as both returns are indented at the same level. It also makes it immediately obviously that the second return is what happens if the if condition is false.