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

◆ write_runtime()

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

Open a runtime file for writing.

Parameters
nameFilename to open. Defaults to the program name.
textIf True (the default), open the file in text mode. This parameter is ignored if the file is not opened.
dirIf True, create a directory instead of a file. Defaults to False.
openedIf True (the default), return the open file. For directories, the target is not created if this is set to False.
packagenameOverride the packagename.
Returns
The opened file, or the file or directory name.

Definition at line 812 of file fhs.py.