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

◆ write_data()

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

Open a data file for writing.

The file is not truncated if it exists.

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