python-fhs
Python module for using the FHS and XDG basedir paths.

◆ write_cache()

def fhs.write_cache (   name = None,
  text = True,
  dir = False,
  opened = True,
  packagename = None 
)

Open a cache file for writing.

The file is not truncated if it exists.

Parameters
nameName of the cache file.
textOpen as a text file if True (the default).
dirCreate a directory if True, a file if False (the default).
openedOpen or create the file if True (the default), report the name if False.
packagenameOverride the packagename.
Returns
The opened file, or the name of the file or directory.

Definition at line 1044 of file fhs.py.