def local_path_as_url(filename):
 return ('file://' + urllib.pathname2url(os.path.abspath(filename)))

def local_path_as_url ( filename ) : return ( 'file://' + urllib . pathname2url ( os . path . abspath ( filename ) ) )
takes a local .