def as_url(s):
    url_parts = urlsplit(s)
    ## Windows drive letter?
    if len(url_parts.scheme)==1 and url_parts.scheme.isalpha():
        return 'file:///%s' % str(s).replace("\\","/")
    if url_parts.scheme:
        return url_parts.geturl()
    else:
        return 'file://%s' % str(s)
Parse and execute single line of a readline init file.
dataset/ETHPy150Open Sage-Bionetworks/synapsePythonClient/synapseclient/utils.py/as_url--crossover with--dataset/ETHPy150Open Ali-Razmjoo/OWASP-ZSC/module/readline_windows/pyreadline/rlmain.py/BaseReadline.parse_and_bind