def binipdisplay(s):
    "convert a binary array of ip adresses to a python list"
    if len(s)%4!= 0:
        raise EnvironmentError # well ...
    ol=[]
    for i in range(len(s)/4):
        s1=s[:4]
        s=s[4:]
        ip=[]
        for j in s1:
            ip.append(str(ord(j)))
        ol.append(string.join(ip,'.')) 
    return ol
convert a binary array of ip adresses to a python list
recipes/Python/66260_Scour_Microsoft_Windows_registry_list_name/recipe-66260.py