Read file from path

def read(path, savedir):
        " Read file from path "
        if path.startswith('http://'):
            name = op.basename(path)
            save_path = op.join(savedir, name)
            if not op.exists(save_path):
                src = urllib2.urlopen(path).read()
                try:
                    open(save_path, 'w').write(src)
                except IOError:
                    return src
            path = save_path
        return open(path, 'r').read()