def scrapeints(string):
    """Extract a series of integers from a string.  Slow but robust.

    readints('[124, 56|abcdsfad4589.2]')

    will return:

    [124, 56, 4589, 2]
    """
    # 2012-08-28 16:19 IJMC: Created

    numbers = []
    nchar = len(string)
    thisnumber = ''
    for n, char in enumerate(string):
        try:
            val = int(char)
            anumber = True
        except:
            anumber = False

        if anumber:
            thisnumber = thisnumber + char
        else: #if (not anumber) or n==(nchar-1):
            if len(thisnumber)>0:
                numbers.append(int(thisnumber))
                thisnumber = ''
    return numbers