def path_to_cache_dir(path):
 (d, p) = os.path.splitdrive(os.path.abspath(path))
 if d:
  d = d.replace(':', '---')
 p = p.replace(os.sep, '--')
 return ((d + p) + '.cache')

def path_to_cache_dir ( path ) : ( d , p ) = os . path . splitdrive ( os . path . abspath ( path ) ) if d : d = d . replace ( ':' , '---' ) p = p . replace ( os . sep , '--' ) return ( ( d + p ) + '.cache' )
convert an absolute path to a directory name for use in a cache .