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

◆ write_spool()

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

Open a spool file for writing.

The file is not truncated if it exists. Users don't have spool directories by default. A directory named "spool" in the cache directory is created for that.

Parameters
nameName of the spool 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 1141 of file fhs.py.