'Builds an Agent instance from a description string of the
form [tor:][hostname:]path.'

@classmethod
def from_string(cls, string, localbase='', maxwaiting=60):

    string = string.split(':', 1)
    if (string[0].lower() == 'tor'):
        string = string[1].split(':', 1)
        usetor = True
    else:
        usetor = False
    if (len(string) == 1):
        return cls(None, string[0], os.path.join(localbase, string[0].replace('/', '_')), maxwaiting=maxwaiting)
    return cls(string[0], string[1], os.path.join(localbase, ('%s_%s' % (string[0].replace('@', '_'), string[1].replace('/', '_')))), usetor=usetor, maxwaiting=maxwaiting)
