'Use local file or FTP depending on form of URL.'

def open_file(self, url):

    if (not isinstance(url, str)):
        raise IOError, ('file    error', 'proxy    support    for    file    protocol    currently    not    implemented')
    if ((url[:2] == '//') and (url[2:3] != '/') and (url[2:12].lower() != 'localhost/')):
        return self.open_ftp(url)
    else:
        return self.open_local_file(url)
