def path_to_url(path):
    '\n    Convert a path to a file: URL.  The path will be made absolute and have\n    quoted path parts.\n    '
    path = os.path.normpath(os.path.abspath(path))
    url = urlparse.urljoin('file:', urllib2.pathname2url(path))
    return url
Convert a path to a file: URL.  The path will be made absolute and have
quoted path parts.
def path_to_url(path):
    '\n    Convert a path to a file: URL.  The path will be made absolute and have\n    quoted path parts.\n    '
    path = os.path.normpath(os.path.abspath(path))
    url = urlparse.urljoin('file:', urllib2.pathname2url(path))
    return url