def pathname2url(pathname):
 return urllib.quote(('///' + pathname.translate(__slash_dot)), '/$:')

def pathname2url ( pathname ) : return urllib . quote ( ( '///' + pathname . translate ( __slash_dot ) ) , '/$:' )
os-specific conversion from a file system path to a relative url of the file scheme; not recommended for general use .